diff options
author | deva <deva> | 2008-08-15 09:37:36 +0000 |
---|---|---|
committer | deva <deva> | 2008-08-15 09:37:36 +0000 |
commit | 5ccdf6dd987be086a8712a4960f770122b1b499b (patch) | |
tree | 7999dd2a4b9e4e3aaccf3493cd7826528ddd1c01 /server/src/tcpsocket.h | |
parent | b7be78948cad7629427fd19769ddcfdfea3fb666 (diff) |
Changes for read-loop-server.
Diffstat (limited to 'server/src/tcpsocket.h')
-rw-r--r-- | server/src/tcpsocket.h | 7 |
1 files changed, 4 insertions, 3 deletions
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; }; |