25 #ifndef SFML_UDPSOCKET_H
26 #define SFML_UDPSOCKET_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>
44 CSFML_NETWORK_API sfUdpSocket* sfUdpSocket_create(
void);
52 CSFML_NETWORK_API
void sfUdpSocket_destroy(sfUdpSocket* socket);
70 CSFML_NETWORK_API
void sfUdpSocket_setBlocking(sfUdpSocket* socket, sfBool blocking);
80 CSFML_NETWORK_API sfBool sfUdpSocket_isBlocking(
const sfUdpSocket* socket);
93 CSFML_NETWORK_API
unsigned short sfUdpSocket_getLocalPort(
const sfUdpSocket* socket);
113 CSFML_NETWORK_API sfSocketStatus sfUdpSocket_bind(sfUdpSocket* socket,
unsigned short port,
sfIpAddress address);
125 CSFML_NETWORK_API
void sfUdpSocket_unbind(sfUdpSocket* socket);
143 CSFML_NETWORK_API sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket,
const void* data,
size_t size,
sfIpAddress remoteAddress,
unsigned short remotePort);
165 CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receive(sfUdpSocket* socket,
void* data,
size_t size,
size_t* received,
sfIpAddress* remoteAddress,
unsigned short* remotePort);
182 CSFML_NETWORK_API sfSocketStatus sfUdpSocket_sendPacket(sfUdpSocket* socket, sfPacket* packet,
sfIpAddress remoteAddress,
unsigned short remotePort);
197 CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receivePacket(sfUdpSocket* socket, sfPacket* packet,
sfIpAddress* remoteAddress,
unsigned short* remotePort);
206 CSFML_NETWORK_API
unsigned int sfUdpSocket_maxDatagramSize();
209 #endif // SFML_UDPSOCKET_H