summaryrefslogtreecommitdiff
path: root/server/src/tcpsocket.h
diff options
context:
space:
mode:
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;
};