Rudiments
|
00001 // Copyright (c) 2002 David Muse 00002 // See the COPYING file for more information. 00003 00004 #ifndef RUDIMENTS_INETSERVERSOCKET_H 00005 #define RUDIMENTS_INETSERVERSOCKET_H 00006 00007 #include <rudiments/private/inetserversocketincludes.h> 00008 00009 #ifdef RUDIMENTS_NAMESPACE 00010 namespace rudiments { 00011 #endif 00012 00013 class inetserversocketprivate; 00014 00025 class RUDIMENTS_DLLSPEC inetserversocket : public serversocket, private inetsocketutil { 00026 public: 00027 00029 inetserversocket(); 00030 00033 inetserversocket(const inetserversocket &i); 00034 00037 inetserversocket &operator=(const inetserversocket &i); 00038 00040 virtual ~inetserversocket(); 00041 00061 bool listen(const char *address, 00062 uint16_t port, 00063 int32_t backlog); 00064 00065 00066 00071 bool initialize(const char *address, uint16_t port); 00072 00076 bool bind(); 00077 00083 bool listen(int32_t backlog); 00084 00090 filedescriptor *accept(); 00091 00096 uint16_t getPort(); 00097 00098 #include <rudiments/private/inetserversocket.h> 00099 }; 00100 00101 #ifdef RUDIMENTS_NAMESPACE 00102 } 00103 #endif 00104 00105 #endif