summaryrefslogtreecommitdiff
path: root/server/src/tcpsocket.h
diff options
context:
space:
mode:
authordeva <deva>2008-08-15 09:37:36 +0000
committerdeva <deva>2008-08-15 09:37:36 +0000
commit5ccdf6dd987be086a8712a4960f770122b1b499b (patch)
tree7999dd2a4b9e4e3aaccf3493cd7826528ddd1c01 /server/src/tcpsocket.h
parentb7be78948cad7629427fd19769ddcfdfea3fb666 (diff)
Changes for read-loop-server.
Diffstat (limited to 'server/src/tcpsocket.h')
-rw-r--r--server/src/tcpsocket.h7
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;
};