SocketServer::handleConnection takes an std::shared_ptr<Socket> instead of a file descriptor

This commit is contained in:
Benjamin Sergeant
2019-09-30 21:48:55 -07:00
parent e5c8e2e7f4
commit 313949f087
14 changed files with 47 additions and 49 deletions

View File

@ -21,6 +21,8 @@
namespace ix
{
class Socket;
class SocketServer
{
public:
@ -96,7 +98,8 @@ namespace ix
// the factory to create ConnectionState objects
ConnectionStateFactory _connectionStateFactory;
virtual void handleConnection(int fd, std::shared_ptr<ConnectionState> connectionState) = 0;
virtual void handleConnection(std::shared_ptr<Socket>,
std::shared_ptr<ConnectionState> connectionState) = 0;
virtual size_t getConnectedClientsCount() = 0;
// Returns true if all connection threads are joined