Loading...
Searching...
No Matches
UdpSocket.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.
113CSFML_NETWORK_API sfSocketStatus sfUdpSocket_bind(sfUdpSocket* socket, unsigned short port, sfIpAddress address);
143CSFML_NETWORK_API sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const void* data, size_t size, sfIpAddress remoteAddress, unsigned short remotePort);
165CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receive(sfUdpSocket* socket, void* data, size_t size, size_t* received, sfIpAddress* remoteAddress, unsigned short* remotePort);
182CSFML_NETWORK_API sfSocketStatus sfUdpSocket_sendPacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress remoteAddress, unsigned short remotePort);
197CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receivePacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress* remoteAddress, unsigned short* remotePort);
sfSocketStatus
Define the status that can be returned by the socket functions.
Definition SocketStatus.h:34
sfSocketStatus sfUdpSocket_receive(sfUdpSocket *socket, void *data, size_t size, size_t *received, sfIpAddress *remoteAddress, unsigned short *remotePort)
Receive raw data from a remote peer with a UDP socket.
unsigned short sfUdpSocket_getLocalPort(const sfUdpSocket *socket)
Get the port to which a UDP socket is bound locally.
sfSocketStatus sfUdpSocket_bind(sfUdpSocket *socket, unsigned short port, sfIpAddress address)
Bind a UDP socket to a specific port.
sfSocketStatus sfUdpSocket_receivePacket(sfUdpSocket *socket, sfPacket *packet, sfIpAddress *remoteAddress, unsigned short *remotePort)
Receive a formatted packet of data from a remote peer with a UDP socket.
void sfUdpSocket_setBlocking(sfUdpSocket *socket, sfBool blocking)
Set the blocking state of a UDP listener.
void sfUdpSocket_unbind(sfUdpSocket *socket)
Unbind a UDP socket from the local port to which it is bound.
sfBool sfUdpSocket_isBlocking(const sfUdpSocket *socket)
Tell whether a UDP socket is in blocking or non-blocking mode.
sfSocketStatus sfUdpSocket_send(sfUdpSocket *socket, const void *data, size_t size, sfIpAddress remoteAddress, unsigned short remotePort)
Send raw data to a remote peer with a UDP socket.
sfSocketStatus sfUdpSocket_sendPacket(sfUdpSocket *socket, sfPacket *packet, sfIpAddress remoteAddress, unsigned short remotePort)
Send a formatted packet of data to a remote peer with a UDP socket.
unsigned int sfUdpSocket_maxDatagramSize(void)
Return the maximum number of bytes that can be sent in a single UDP datagram.