A websocket implementation for zig
0

Configure Feed

Select the types of activity you want to include in your feed.

Try to improve shutdown in blocking mode

shutting down the socket seems necessary on Linux (although, linux wouldn't
use blocking mode, but maybe it's necessary on windows too)

+6 -4
+3 -3
.github/workflows/ci.yml
··· 4 4 test: 5 5 runs-on: ubuntu-latest 6 6 steps: 7 - - uses: actions/checkout@v2 7 + - uses: actions/checkout@v4 8 8 - name: Install dependencies 9 9 run: | 10 10 sudo snap install zig --classic --edge ··· 18 18 - name: build server x86_64-linux-gnu 19 19 run: cd support/autobahn/server && zig build -Dtarget=x86_64-linux-gnu 20 20 - name: build server x86_64-windows-gnu 21 - run: cd support/autobahn/server && zig build -Dtarget=build x86_64-windows-gnu 21 + run: cd support/autobahn/server && zig build -Dtarget=x86_64-windows-gnu 22 22 - name: build client x86-linux-gnu 23 23 run: cd support/autobahn/client && zig build -Dtarget=x86-linux-gnu 24 24 - name: build server x86_64-linux-gnu 25 25 run: cd support/autobahn/client && zig build -Dtarget=x86_64-linux-gnu 26 26 - name: build clietn x86_64-windows-gnu 27 - run: cd support/autobahn/client && zig build -Dtarget=build x86_64-windows-gnu 27 + run: cd support/autobahn/client && zig build -Dtarget=x86_64-windows-gnu
+3 -1
src/server/server.zig
··· 426 426 } 427 427 428 428 // called for each hc when shutting down 429 - fn shutdownCleanup(_: *Self, _: *HandlerConn(H)) void {} 429 + fn shutdownCleanup(_: *Self, hc: *HandlerConn(H)) void { 430 + posix.shutdown(hc.socket, .recv) catch {}; 431 + } 430 432 }; 431 433 } 432 434