Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SocketBuilder.h

00001 /*
00002  * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved.
00003  * This software is released under the modified BSD license.
00004  * See the file LICENSE in the top-level directory for details.
00005  */
00006 //
00007 // $Id: SocketBuilder.h,v 1.4 2005/03/02 20:03:25 mmarsh Exp $
00008 //
00009 // $Log: SocketBuilder.h,v $
00010 // Revision 1.4  2005/03/02 20:03:25  mmarsh
00011 // Added a copy constructor.
00012 //
00013 // Revision 1.3  2004/05/19 15:56:56  mmarsh
00014 // *** empty log message ***
00015 //
00016 // Revision 1.2  2003/11/04 22:31:50  mmarsh
00017 // *** empty log message ***
00018 //
00019 //
00020 
00021 #ifndef __CODEX_QUORUM_SOCKETBUILDER_H__
00022 #define __CODEX_QUORUM_SOCKETBUILDER_H__
00023 
00024 #include <sys/socket.h>
00025 
00026 namespace CODEX_Quorum
00027 {
00028    class SocketBase;
00029 
00038    class SocketBuilder
00039    {
00040       public :
00053          SocketBuilder( int   domain=PF_INET   ,
00054                         int   type=SOCK_STREAM ,
00055                         int   protocol=0       ,
00056                         bool  blocking=false   ) :
00057             m_domain( domain ),
00058             m_type( type ),
00059             m_protocol( protocol ),
00060             m_blocking( blocking )
00061          {}
00062 
00064          SocketBuilder( const SocketBuilder& sb ) :
00065             m_domain( sb.m_domain ),
00066             m_type( sb.m_type ),
00067             m_protocol( sb.m_protocol ),
00068             m_blocking( sb.m_blocking )
00069          {}
00070 
00072          virtual ~SocketBuilder() {}
00073 
00082          virtual SocketBase* operator()() const;
00083 
00084       protected :
00085          int   m_domain; 
00086          int   m_type; 
00087          int   m_protocol; 
00088          bool  m_blocking; 
00089    };
00090 
00091 }
00092 
00093 #endif /* __CODEX_QUORUM_SOCKETBUILDER_H__ */

Generated on Fri May 6 17:41:16 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1