Listens for incoming TCP/IP socket connections. More...
#include <tcp_listen.h>
Public Member Functions | |
TCPListen () | |
Create null object. More... | |
TCPListen (const SocketName &endpoint, int backlog=5, bool reuse_address=true) | |
Create a listening socket for the specified end point. More... | |
~TCPListen () | |
TCPConnection | accept (SocketName &end_point) |
Accept an incoming connection. More... | |
void | close () |
Stops listening for incoming messages and closes the socket. More... | |
bool | is_null () const |
Returns true if it is a null object. More... | |
Protected Member Functions | |
SocketHandle * | get_socket_handle () override |
Listens for incoming TCP/IP socket connections.
clan::TCPListen::TCPListen | ( | ) |
Create null object.
clan::TCPListen::TCPListen | ( | const SocketName & | endpoint, |
int | backlog = 5 , |
||
bool | reuse_address = true |
||
) |
Create a listening socket for the specified end point.
clan::TCPListen::~TCPListen | ( | ) |
TCPConnection clan::TCPListen::accept | ( | SocketName & | end_point | ) |
Accept an incoming connection.
end_point | Socket name of the accepted peer |
void clan::TCPListen::close | ( | ) |
Stops listening for incoming messages and closes the socket.
|
overrideprotectedvirtual |
Implements clan::NetworkEvent.
|
inline |
Returns true if it is a null object.