Loading...
Searching...
No Matches
UdpSocket.hpp
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.
132 Status send(const void* data, std::size_t size, const IpAddress& remoteAddress, unsigned short remotePort);
Utility class to build blocks of data to transfer over the network.
Definition Packet.hpp:48
Status send(Packet &packet, const IpAddress &remoteAddress, unsigned short remotePort)
Send a formatted packet of data to a remote peer.
unsigned short getLocalPort() const
Get the port to which the socket is bound locally.
Status send(const void *data, std::size_t size, const IpAddress &remoteAddress, unsigned short remotePort)
Send raw data to a remote peer.
@ MaxDatagramSize
The maximum number of bytes that can be sent in a single UDP datagram.
Definition UdpSocket.hpp:54
Status bind(unsigned short port, const IpAddress &address=IpAddress::Any)
Bind the socket to a specific port.
Status receive(void *data, std::size_t size, std::size_t &received, IpAddress &remoteAddress, unsigned short &remotePort)
Receive raw data from a remote peer.
Status receive(Packet &packet, IpAddress &remoteAddress, unsigned short &remotePort)
Receive a formatted packet of data from a remote peer.
Definition AlResource.hpp:35