mirror of
https://github.com/netchx/netch.git
synced 2026-05-05 22:35:48 +08:00
[Redirector] Fix build
This commit is contained in:
@@ -425,7 +425,7 @@ void udpBeginReceive(ENDPOINT_ID id, SocksHelper::PUDP udpConn, PNF_UDP_OPTIONS
|
||||
{
|
||||
SOCKADDR_IN6 target;
|
||||
|
||||
int length = udpConn->Read(&target, buffer, sizeof(buffer));
|
||||
int length = udpConn->Read(&target, buffer, sizeof(buffer), NULL);
|
||||
if (length == 0 || length == SOCKET_ERROR)
|
||||
{
|
||||
break;
|
||||
|
||||
@@ -398,7 +398,7 @@ int SocksHelper::UDP::Send(PSOCKADDR_IN6 target, const char* buffer, int length)
|
||||
return length;
|
||||
}
|
||||
|
||||
int SocksHelper::UDP::Read(PSOCKADDR_IN6 target, char* buffer, int length, PTIMEVAL timeout = NULL)
|
||||
int SocksHelper::UDP::Read(PSOCKADDR_IN6 target, char* buffer, int length, PTIMEVAL timeout)
|
||||
{
|
||||
if (!this->udpSocket)
|
||||
return SOCKET_ERROR;
|
||||
@@ -409,7 +409,7 @@ int SocksHelper::UDP::Read(PSOCKADDR_IN6 target, char* buffer, int length, PTIME
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(this->udpSocket, &fds);
|
||||
|
||||
int code = select(this->udpSocket, &fds, NULL, NULL, timeout);
|
||||
int code = select(NULL, &fds, NULL, NULL, timeout);
|
||||
if (code == 0 || code == SOCKET_ERROR)
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace SocksHelper
|
||||
bool CreateUDP();
|
||||
|
||||
int Send(PSOCKADDR_IN6 target, const char* buffer, int length);
|
||||
int Read(PSOCKADDR_IN6 target, char* buffer, int length, PTIMEVAL timeout = NULL);
|
||||
int Read(PSOCKADDR_IN6 target, char* buffer, int length, PTIMEVAL timeout);
|
||||
|
||||
SOCKET tcpSocket = INVALID_SOCKET;
|
||||
SOCKET udpSocket = INVALID_SOCKET;
|
||||
|
||||
Reference in New Issue
Block a user