mirror of
https://github.com/netchx/netch.git
synced 2026-05-05 22:35:48 +08:00
[Redirector] Fix missing declaration
This commit is contained in:
@@ -299,7 +299,7 @@ void udpSend(ENDPOINT_ID id, const unsigned char* target, const char* buffer, in
|
||||
return;
|
||||
}
|
||||
|
||||
PNF_UDP_OPTIONS data = new NF_UDP_OPTIONS();
|
||||
auto data = new NF_UDP_OPTIONS();
|
||||
memcpy(data, options, sizeof(NF_UDP_OPTIONS));
|
||||
|
||||
thread(udpBeginReceive, id, conn, data).detach();
|
||||
@@ -350,7 +350,6 @@ void udpBeginReceive(ENDPOINT_ID id, SocksHelper::PUDP conn, PNF_UDP_OPTIONS dat
|
||||
while (conn->udpSocket != INVALID_SOCKET)
|
||||
{
|
||||
SOCKADDR_IN6 target;
|
||||
int targetLength = sizeof(SOCKADDR_IN6);
|
||||
|
||||
int length = conn->Read((PSOCKADDR)&target, buffer, 1458);
|
||||
if (length == 0 || length == SOCKET_ERROR)
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#define EVENTHANDLER_H
|
||||
#include "Based.h"
|
||||
|
||||
#include "SocksHelper.h"
|
||||
|
||||
bool eh_init();
|
||||
void eh_free();
|
||||
|
||||
@@ -23,4 +25,6 @@ void udpCanReceive(ENDPOINT_ID id);
|
||||
void udpReceive(ENDPOINT_ID id, const unsigned char* target, const char* buffer, int length, PNF_UDP_OPTIONS options);
|
||||
void udpClosed(ENDPOINT_ID id, PNF_UDP_CONN_INFO info);
|
||||
|
||||
void udpBeginReceive(ENDPOINT_ID id, SocksHelper::PUDP conn, PNF_UDP_OPTIONS data);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user