karlseguin / websocket.zig

A websocket implementation for zig
MIT License
302 stars 28 forks source link

Multiplatform WS Client #44

Closed Abso1ut3Zer0 closed 2 months ago

Abso1ut3Zer0 commented 2 months ago

Hi, I'm toying around with Zig and came across this library. I'm creating a simple prototype for an app that uses the websocket client, but it seems that it only supports Linux due to the posix import. Do you have plans to expand to other platforms?

I'm currently using a Mac, but my build failed on the timeout parts of the code using std.posix.timeval are using the Linux specific fields (.sec and .usec vs .tv_sec and .tv_usec).

karlseguin commented 2 months ago

I assume you're using Zig 0.13? This was a change in Zig itself since then. Try using the zig-0.13 branch

Abso1ut3Zer0 commented 2 months ago

Yes that worked!