Loading...
Searching...
No Matches
TcpListener.h
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
115CSFML_NETWORK_API sfSocketStatus sfTcpListener_listen(sfTcpListener* listener, unsigned short port, sfIpAddress address);
144CSFML_NETWORK_API sfSocketStatus sfTcpListener_accept(sfTcpListener* listener, sfTcpSocket** connected);
sfSocketStatus
Define the status that can be returned by the socket functions.
Definition SocketStatus.h:32
void sfTcpListener_destroy(const sfTcpListener *listener)
Destroy a TCP listener.
bool sfTcpListener_isBlocking(const sfTcpListener *listener)
Tell whether a TCP listener is in blocking or non-blocking mode.
sfSocketStatus sfTcpListener_accept(sfTcpListener *listener, sfTcpSocket **connected)
Accept a new connection.
void sfTcpListener_setBlocking(sfTcpListener *listener, bool blocking)
Set the blocking state of a TCP listener.
sfSocketStatus sfTcpListener_listen(sfTcpListener *listener, unsigned short port, sfIpAddress address)
Start listening for connections.
unsigned short sfTcpListener_anyPort(void)
Return the special value that tells the system to pick any available port.
void sfTcpListener_close(sfTcpListener *listener)
Stop listening and close the socket.
unsigned short sfTcpListener_getLocalPort(const sfTcpListener *listener)
Get the port to which a TCP listener is bound locally.