• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ibrcommon/ibrcommon/net/tcpserver.h

Go to the documentation of this file.
00001 /*
00002  * tcpserver.h
00003  *
00004  *  Created on: 29.07.2009
00005  *      Author: morgenro
00006  */
00007 
00008 #ifndef IBRCOMMON_TCPSERVER_H_
00009 #define IBRCOMMON_TCPSERVER_H_
00010 
00011 #include "ibrcommon/net/tcpstream.h"
00012 #include "ibrcommon/net/NetInterface.h"
00013 #include <netinet/in.h>
00014 #include "ibrcommon/Exceptions.h"
00015 #include "ibrcommon/data/File.h"
00016 
00017 namespace ibrcommon
00018 {
00019         class tcpserver
00020         {
00021         public:
00022                 tcpserver(const ibrcommon::File &socket);
00023 
00028                 tcpserver(NetInterface net, int port, bool reuseaddr = true);
00029 
00033                 virtual ~tcpserver();
00034 
00039                 tcpstream* accept();
00040 
00041                 void close();
00042                 void shutdown();
00043 
00044         private:
00045                 int _socket;
00046                 bool _closed;
00047 
00048         };
00049 }
00050 
00051 #endif /* TCPSERVER_H_ */

Generated on Thu Nov 11 2010 09:49:47 for IBR-DTNSuite by  doxygen 1.7.1