Improved UDP socket binding, multicast and IPv6

This commit is contained in:
Thulinma 2016-09-22 09:31:30 +02:00
parent 29c37fd4e9
commit 3639705ef6
2 changed files with 193 additions and 75 deletions

View file

@ -129,13 +129,14 @@ namespace Socket {
unsigned int up;///< Amount of bytes transferred up.
unsigned int down;///< Amount of bytes transferred down.
unsigned int data_size;///< The size in bytes of the allocated space in the data pointer.
bool isIPv6;//<<< True if IPv6 socket, false otherwise.
int family;///<Current socket address family
public:
char * data;///< Holds the last received packet.
unsigned int data_len; ///< The size in bytes of the last received packet.
UDPConnection(const UDPConnection & o);
UDPConnection(bool nonblock = false);
~UDPConnection();
void close();
int getSock();
int bind(int port, std::string iface = "", const std::string & multicastAddress = "");
void setBlocking(bool blocking);