25 #ifndef SFML_TCPSOCKET_H
26 #define SFML_TCPSOCKET_H
232 #endif // SFML_TCPSOCKET_H
CSFML_NETWORK_API void sfTcpSocket_setBlocking(sfTcpSocket *socket, sfBool blocking)
Set the blocking state of a TCP listener.
#define CSFML_NETWORK_API
CSFML_NETWORK_API void sfTcpSocket_destroy(sfTcpSocket *socket)
Destroy a TCP socket.
CSFML_NETWORK_API sfBool sfTcpSocket_isBlocking(const sfTcpSocket *socket)
Tell whether a TCP socket is in blocking or non-blocking mode.
Encapsulate an IPv4 network address.
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_send(sfTcpSocket *socket, const void *data, size_t size)
Send raw data to the remote peer of a TCP socket.
CSFML_NETWORK_API unsigned short sfTcpSocket_getLocalPort(const sfTcpSocket *socket)
Get the port to which a TCP socket is bound locally.
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_receivePacket(sfTcpSocket *socket, sfPacket *packet)
Receive a formatted packet of data from the remote peer.
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_sendPartial(sfTcpSocket *socket, const void *data, size_t size, size_t *sent)
Send raw data to the remote peer.
CSFML_NETWORK_API void sfTcpSocket_disconnect(sfTcpSocket *socket)
Disconnect a TCP socket from its remote peer.
CSFML_NETWORK_API sfIpAddress sfTcpSocket_getRemoteAddress(const sfTcpSocket *socket)
Get the address of the connected peer of a TCP socket.
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_sendPacket(sfTcpSocket *socket, sfPacket *packet)
Send a formatted packet of data to the remote peer of a TCP socket.
struct sfTcpSocket sfTcpSocket
CSFML_NETWORK_API sfTcpSocket * sfTcpSocket_create(void)
Create a new TCP socket.
CSFML_NETWORK_API unsigned short sfTcpSocket_getRemotePort(const sfTcpSocket *socket)
Get the port of the connected peer to which a TCP socket is connected.
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_receive(sfTcpSocket *socket, void *data, size_t maxSize, size_t *sizeReceived)
Receive raw data from the remote peer of a TCP socket.
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_connect(sfTcpSocket *socket, sfIpAddress host, unsigned short port, sfTime timeout)
Connect a TCP socket to a remote peer.
sfSocketStatus
Define the status that can be returned by the socket functions.