mirror of
https://github.com/netchx/netch.git
synced 2026-04-01 19:15:09 +08:00
[Redirector] Optimize code
This commit is contained in:
@@ -309,7 +309,7 @@ void udpSend(ENDPOINT_ID id, const unsigned char* target, const char* buffer, in
|
||||
return;
|
||||
}
|
||||
|
||||
auto data = (PNF_UDP_OPTIONS)new char[sizeof(NF_UDP_OPTIONS) + options->optionsLength];
|
||||
auto data = (PNF_UDP_OPTIONS)new char[sizeof(NF_UDP_OPTIONS) + options->optionsLength]();
|
||||
memcpy(data, options, sizeof(NF_UDP_OPTIONS) + options->optionsLength - 1);
|
||||
|
||||
thread(udpBeginReceive, id, udpConn, data).detach();
|
||||
|
||||
Reference in New Issue
Block a user