#ifndef TCPSERVER_H #define TCPSERVER_H namespace icinga { struct I2_BASE_API NewClientEventArgs : public EventArgs { typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; TCPSocket::Ptr Client; }; class I2_BASE_API TCPServer : public TCPSocket { private: int ReadableEventHandler(const EventArgs& ea); function m_ClientFactory; public: typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; TCPServer(void); void SetClientFactory(function function); function GetFactoryFunction(void) const; virtual void Start(); void Listen(void); Event OnNewClient; virtual bool WantsToRead(void) const; }; } #endif /* TCPSERVER_H */