diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-14 18:04:25 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-14 18:04:25 +0000 |
commit | 715d0c3952a3a1d59b64074e472d0a9a3b414351 (patch) | |
tree | a5d0ddd0613caaf4f9fe01f9a3bd34e823651ad5 /src/net/tcpserver.h | |
parent | 83e8023c5e46635753a609329cf9805a3520001e (diff) |
dedicated server accepts incoming connections
Diffstat (limited to 'src/net/tcpserver.h')
-rw-r--r-- | src/net/tcpserver.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/tcpserver.h b/src/net/tcpserver.h index dd87689..99639eb 100644 --- a/src/net/tcpserver.h +++ b/src/net/tcpserver.h @@ -32,12 +32,15 @@ public: bool error() const; protected: - /// Accept incoming connections + /// accept an incoming connection void accept(); + /// Set the error state void abort(); + /// Returns the file descriptor the TCP server is listening on int fd() const; + /// Called by accept() whenever a new client connects virtual void client_connect(int const clientfd, std::string const host, int const port) = 0; |