formatting
This commit is contained in:
parent
36be516584
commit
4d7e06541e
@ -397,7 +397,7 @@ void NET_W32_TickForever(WaveLaneCtx *lane)
|
|||||||
//- Read incoming packets
|
//- Read incoming packets
|
||||||
|
|
||||||
// TODO: Rate limit
|
// TODO: Rate limit
|
||||||
// TODO: Per-frame recv limit to ensure other pipes are still serviced during load
|
// TODO: Per-frame recv limit to ensure pipes are still serviced during load
|
||||||
|
|
||||||
{
|
{
|
||||||
i64 wake_count = 0;
|
i64 wake_count = 0;
|
||||||
@ -629,7 +629,7 @@ void NET_W32_TickForever(WaveLaneCtx *lane)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- Process pipes
|
//- Service pipes
|
||||||
|
|
||||||
for (i64 pipe_idx = 0; pipe_idx < pipes_count; ++pipe_idx)
|
for (i64 pipe_idx = 0; pipe_idx < pipes_count; ++pipe_idx)
|
||||||
{
|
{
|
||||||
@ -688,7 +688,6 @@ void NET_W32_TickForever(WaveLaneCtx *lane)
|
|||||||
SOCKET sock = 0;
|
SOCKET sock = 0;
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
// sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
|
|
||||||
sock = WSASocketW(ai->ai_family, ai->ai_socktype, ai->ai_protocol, 0, 0, WSA_FLAG_OVERLAPPED);
|
sock = WSASocketW(ai->ai_family, ai->ai_socktype, ai->ai_protocol, 0, 0, WSA_FLAG_OVERLAPPED);
|
||||||
ok = sock != INVALID_SOCKET;
|
ok = sock != INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
@ -742,7 +741,7 @@ void NET_W32_TickForever(WaveLaneCtx *lane)
|
|||||||
ok = bind(sock, ai->ai_addr, (i32)ai->ai_addrlen) == 0;
|
ok = bind(sock, ai->ai_addr, (i32)ai->ai_addrlen) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Enable non-blocking
|
//- Disable blocking
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
u_long nonblocking = 1;
|
u_long nonblocking = 1;
|
||||||
@ -751,28 +750,32 @@ void NET_W32_TickForever(WaveLaneCtx *lane)
|
|||||||
|
|
||||||
//- Disable ICMP reporting
|
//- Disable ICMP reporting
|
||||||
{
|
{
|
||||||
DWORD bytes = 0;
|
if (ok)
|
||||||
b32 report = 0;
|
{
|
||||||
int rc = WSAIoctl(
|
DWORD bytes = 0;
|
||||||
sock,
|
b32 report = 0;
|
||||||
SIO_UDP_CONNRESET,
|
ok = WSAIoctl(
|
||||||
&report, sizeof(report),
|
sock,
|
||||||
0, 0,
|
SIO_UDP_CONNRESET,
|
||||||
&bytes,
|
&report, sizeof(report),
|
||||||
0, 0
|
0, 0,
|
||||||
);
|
&bytes,
|
||||||
}
|
0, 0
|
||||||
{
|
) == 0;
|
||||||
DWORD bytes = 0;
|
}
|
||||||
b32 report = 0;
|
if (ok)
|
||||||
int rc = WSAIoctl(
|
{
|
||||||
sock,
|
DWORD bytes = 0;
|
||||||
SIO_UDP_NETRESET,
|
b32 report = 0;
|
||||||
&report, sizeof(report),
|
ok = WSAIoctl(
|
||||||
0, 0,
|
sock,
|
||||||
&bytes,
|
SIO_UDP_NETRESET,
|
||||||
0, 0
|
&report, sizeof(report),
|
||||||
);
|
0, 0,
|
||||||
|
&bytes,
|
||||||
|
0, 0
|
||||||
|
) == 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Fetch bound port
|
//- Fetch bound port
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user