From 5ccdf6dd987be086a8712a4960f770122b1b499b Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 15 Aug 2008 09:37:36 +0000 Subject: Changes for read-loop-server. --- server/src/tcpsocket.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/src/tcpsocket.h') diff --git a/server/src/tcpsocket.h b/server/src/tcpsocket.h index 393d40b..4771d10 100644 --- a/server/src/tcpsocket.h +++ b/server/src/tcpsocket.h @@ -103,7 +103,7 @@ public: /** * Constructor. Creates a new tcp socket. */ - TCPSocket() throw(TCPSocketException); + TCPSocket(std::string name = "", int sock = -1) throw(TCPSocketException); /** * Destructor. Closes the tcp socket. @@ -123,7 +123,7 @@ public: * Multiple accepts can be made on the same listening socket. * @return A connected TCPSocket ready to communicate. */ - TCPSocket accept() throw(TCPAcceptException); + TCPSocket *accept() throw(TCPAcceptException); /** * Connects to a host for data transmission. @@ -149,7 +149,7 @@ public: * @param size The maximum number of bytes to read in (the size of the buffer). * @return The actual number of bytes read. */ - int read(char *buf, int size) throw(TCPReadException); + int read(char *buf, int size, long timeout = -1) throw(TCPReadException); /** * Writes bytes from a buffer to the socket. @@ -175,6 +175,7 @@ public: private: bool isconnected; int sock; + std::string name; }; -- cgit v1.2.3