lithdew / pike

Async I/O for Zig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate file handle from pike.Handle.

lithdew opened this issue · comments

Sockets on Windows are represented by a ws2_32.SOCKET, unlike generic file handles which are represented by windows.HANDLE.

To cleanup all the verbose @ptrCast(ws2_32.SOCKET, self.handle.inner) casts in socket_windows.zig, it would be ideal to separate the file handle from pike.Handle.

Doing so would also allow removing unnecessary fields, such as async types that do not require a file handle (e.g. signal_posix.zig).