From 915005e218b5d00939b548de65ce6354f7acb487 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 28 Jul 2023 21:18:56 -0700 Subject: Completely redesigned Server and Client. Like, seriously, they're almost completely different. --- src/stable/tcpserversocket.h | 65 -------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 src/stable/tcpserversocket.h (limited to 'src/stable/tcpserversocket.h') diff --git a/src/stable/tcpserversocket.h b/src/stable/tcpserversocket.h deleted file mode 100644 index d15d7bd..0000000 --- a/src/stable/tcpserversocket.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2007-2019 Xagasoft, All rights reserved. - * - * This file is part of the libbu++ library and is released under the - * terms of the license contained in the file LICENSE. - */ - -#ifndef BU_TCP_SERVER_SOCKET_H -#define BU_TCP_SERVER_SOCKET_H - -#include -#include "bu/string.h" -#include "bu/exceptionbase.h" - -#ifdef WIN32 - #include -#else - #include -#endif - -namespace Bu -{ - subExceptionDecl( TcpServerSocketException ); - - /** - * A single tcp/ip server socket. When created the server socket will bind - * to the specified interface and port, and immediately begin listening for - * connections. When connections come in they are pooled by the networking - * drivers in the kernel until they are accepted, this means that failure - * to keep space in the connection pool will result in connection refusals. - * - * Although the accept function returns an integral file descriptor, it is - * designed to be used with the Socket class. - * - *@ingroup Serving - */ - class TcpServerSocket - { - public: -#ifdef WIN32 - typedef unsigned int socket_t; -#else - typedef int socket_t; -#endif - TcpServerSocket( int nPort, int nPoolSize=40 ); - TcpServerSocket( const String &sAddr, int nPort, int nPoolSize=40 ); - TcpServerSocket( socket_t nSocket, bool bInit, int nPoolSize=40 ); - TcpServerSocket( const TcpServerSocket &rSrc ); - virtual ~TcpServerSocket(); - - int accept( int nTimeoutSec=0, int nTimeoutUSec=0 ); - int getSocket(); - int getPort(); - - private: - void startServer( struct sockaddr_in &name, int nPoolSize ); - void initServer( struct sockaddr_in &name, int nPoolSize ); - - fd_set fdActive; - socket_t nServer; - int nPort; - }; -} - -#endif -- cgit v1.2.3