25 #ifndef SFML_TCPSOCKET_H
26 #define SFML_TCPSOCKET_H
31 #include <SFML/Network/Export.h>
32 #include <SFML/Network/IpAddress.h>
33 #include <SFML/Network/SocketStatus.h>
34 #include <SFML/Network/Types.h>
35 #include <SFML/System/Time.h>
45 CSFML_NETWORK_API sfTcpSocket* sfTcpSocket_create(
void);
53 CSFML_NETWORK_API
void sfTcpSocket_destroy(sfTcpSocket* socket);
71 CSFML_NETWORK_API
void sfTcpSocket_setBlocking(sfTcpSocket* socket, sfBool blocking);
81 CSFML_NETWORK_API sfBool sfTcpSocket_isBlocking(
const sfTcpSocket* socket);
93 CSFML_NETWORK_API
unsigned short sfTcpSocket_getLocalPort(
const sfTcpSocket* socket);
106 CSFML_NETWORK_API
sfIpAddress sfTcpSocket_getRemoteAddress(
const sfTcpSocket* socket);
119 CSFML_NETWORK_API
unsigned short sfTcpSocket_getRemotePort(
const sfTcpSocket* socket);
137 CSFML_NETWORK_API sfSocketStatus sfTcpSocket_connect(sfTcpSocket* socket,
sfIpAddress remoteAddress,
unsigned short remotePort,
sfTime timeout);
148 CSFML_NETWORK_API
void sfTcpSocket_disconnect(sfTcpSocket* socket);
165 CSFML_NETWORK_API sfSocketStatus sfTcpSocket_send(sfTcpSocket* socket,
const void* data,
size_t size);
180 CSFML_NETWORK_API sfSocketStatus sfTcpSocket_sendPartial(sfTcpSocket* socket,
const void* data,
size_t size,
size_t* sent);
197 CSFML_NETWORK_API sfSocketStatus sfTcpSocket_receive(sfTcpSocket* socket,
void* data,
size_t size,
size_t* received);
214 CSFML_NETWORK_API sfSocketStatus sfTcpSocket_sendPacket(sfTcpSocket* socket, sfPacket* packet);
229 CSFML_NETWORK_API sfSocketStatus sfTcpSocket_receivePacket(sfTcpSocket* socket, sfPacket* packet);
232 #endif // SFML_TCPSOCKET_H