Go to the documentation of this file.00001 #ifndef QRK_TCPIP_ACCEPTER_H
00002 #define QRK_TCPIP_ACCEPTER_H
00003
00013 #include <memory>
00014
00015
00016 namespace qrk
00017 {
00018 class TcpipSocket;
00019
00020
00022 class TcpipAccepter
00023 {
00024 public:
00025 enum {
00026 NoTimeout = -1,
00027 };
00028 TcpipAccepter(void);
00029 ~TcpipAccepter(void);
00030
00031
00037 const char* what(void) const;
00038
00039
00045 bool activate(long port);
00046
00047
00051 void deactivate(void);
00052
00053
00059 TcpipSocket* accept(int timeout = NoTimeout);
00060
00061
00070 const char* name(void);
00071
00072 private:
00073 TcpipAccepter(const TcpipAccepter& rhs);
00074 TcpipAccepter& operator = (const TcpipAccepter& rhs);
00075
00076 struct pImpl;
00077 const std::auto_ptr<pImpl> pimpl;
00078 };
00079 }
00080
00081 #endif