Template for TCP listeners. More...
#include <tcp_listen.h>
Static Public Member Functions | |
static void | AcceptClient (SOCKET ls) |
Accepts clients from the sockets. | |
static bool | Receive () |
Handle the receiving of packets. | |
static bool | Listen (uint16 port) |
Listen on a particular port. | |
static void | CloseListeners () |
Close the sockets we're listening on. | |
Static Private Attributes | |
static SocketList | sockets |
List of sockets we listen on. |
Template for TCP listeners.
Tsocket | The class we create sockets for. | |
Tfull_packet | The packet type to return when we don't allow more sockets. | |
Tban_packet | The packet type to return when the client is banned. |
Definition at line 32 of file tcp_listen.h.
static void TCPListenHandler< Tsocket, Tfull_packet, Tban_packet >::AcceptClient | ( | SOCKET | ls | ) | [inline, static] |
Accepts clients from the sockets.
ls | Socket to accept clients from. |
Definition at line 41 of file tcp_listen.h.
Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::Receive().
static void TCPListenHandler< Tsocket, Tfull_packet, Tban_packet >::CloseListeners | ( | ) | [inline, static] |
Close the sockets we're listening on.
Definition at line 164 of file tcp_listen.h.
static bool TCPListenHandler< Tsocket, Tfull_packet, Tban_packet >::Listen | ( | uint16 | port | ) | [inline, static] |
Listen on a particular port.
port | The port to listen on. |
Definition at line 143 of file tcp_listen.h.
static bool TCPListenHandler< Tsocket, Tfull_packet, Tban_packet >::Receive | ( | ) | [inline, static] |
Handle the receiving of packets.
Definition at line 96 of file tcp_listen.h.
SocketList TCPListenHandler< Tsocket, Tfull_packet, Tban_packet >::sockets [static, private] |
List of sockets we listen on.
Definition at line 34 of file tcp_listen.h.
Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::CloseListeners(), TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::Listen(), and TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::Receive().