Socket::UDPConnection now uses its currently bound socket type for destinations
This commit is contained in:
parent
b9c03ccb18
commit
540694df1f
2 changed files with 3 additions and 1 deletions
|
@ -1685,7 +1685,7 @@ void Socket::UDPConnection::SetDestination(std::string destIp, uint32_t port){
|
||||||
ss << port;
|
ss << port;
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(struct addrinfo));
|
memset(&hints, 0, sizeof(struct addrinfo));
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = family;
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
hints.ai_socktype = SOCK_DGRAM;
|
||||||
hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
|
hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
|
||||||
hints.ai_protocol = IPPROTO_UDP;
|
hints.ai_protocol = IPPROTO_UDP;
|
||||||
|
|
|
@ -212,6 +212,8 @@ namespace Socket{
|
||||||
void setBlocking(bool blocking);
|
void setBlocking(bool blocking);
|
||||||
void SetDestination(std::string hostname, uint32_t port);
|
void SetDestination(std::string hostname, uint32_t port);
|
||||||
void GetDestination(std::string &hostname, uint32_t &port);
|
void GetDestination(std::string &hostname, uint32_t &port);
|
||||||
|
const void * getDestAddr(){return destAddr;}
|
||||||
|
size_t getDestAddrLen(){return destAddr_size;}
|
||||||
std::string getBoundAddress();
|
std::string getBoundAddress();
|
||||||
uint32_t getDestPort() const;
|
uint32_t getDestPort() const;
|
||||||
bool Receive();
|
bool Receive();
|
||||||
|
|
Loading…
Add table
Reference in a new issue