1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2026-08-02 00:46:08 -04:00

xlxd 1.2.4 / db 2.1.0

implement XLX interlink feature
This commit is contained in:
LX3JL
2016-02-11 18:51:12 +01:00
parent 4831ba8829
commit 2f9e8a8781
259 changed files with 2603 additions and 647 deletions
+20
View File
@@ -151,3 +151,23 @@ int CUdpSocket::Send(const char *Buffer, const CIp &Ip)
(void *)Buffer, ::strlen(Buffer),
0, (struct sockaddr *)temp.GetSockAddr(), sizeof(struct sockaddr_in));
}
int CUdpSocket::Send(const CBuffer &Buffer, const CIp &Ip, uint16 destport)
{
CIp temp(Ip);
temp.GetSockAddr()->sin_port = htons(destport);
return (int)::sendto(m_Socket,
(void *)Buffer.data(), Buffer.size(),
0, (struct sockaddr *)temp.GetSockAddr(), sizeof(struct sockaddr_in));
}
int CUdpSocket::Send(const char *Buffer, const CIp &Ip, uint16 destport)
{
CIp temp(Ip);
temp.GetSockAddr()->sin_port = htons(destport);
return (int)::sendto(m_Socket,
(void *)Buffer, ::strlen(Buffer),
0, (struct sockaddr *)temp.GetSockAddr(), sizeof(struct sockaddr_in));
}