From 715d0c3952a3a1d59b64074e472d0a9a3b414351 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 14 Feb 2008 18:04:25 +0000 Subject: dedicated server accepts incoming connections --- src/net/tcpserver.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/net/tcpserver.h') 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; -- cgit v1.2.3