formatting

This commit is contained in:
jacob 2026-01-19 21:11:32 -06:00
parent 36be516584
commit 4d7e06541e

View File

@ -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;
@ -750,29 +749,33 @@ void NET_W32_TickForever(WaveLaneCtx *lane)
} }
//- Disable ICMP reporting //- Disable ICMP reporting
{
if (ok)
{ {
DWORD bytes = 0; DWORD bytes = 0;
b32 report = 0; b32 report = 0;
int rc = WSAIoctl( ok = WSAIoctl(
sock, sock,
SIO_UDP_CONNRESET, SIO_UDP_CONNRESET,
&report, sizeof(report), &report, sizeof(report),
0, 0, 0, 0,
&bytes, &bytes,
0, 0 0, 0
); ) == 0;
} }
if (ok)
{ {
DWORD bytes = 0; DWORD bytes = 0;
b32 report = 0; b32 report = 0;
int rc = WSAIoctl( ok = WSAIoctl(
sock, sock,
SIO_UDP_NETRESET, SIO_UDP_NETRESET,
&report, sizeof(report), &report, sizeof(report),
0, 0, 0, 0,
&bytes, &bytes,
0, 0 0, 0
); ) == 0;
}
} }
//- Fetch bound port //- Fetch bound port