pike icon indicating copy to clipboard operation
pike copied to clipboard

Separate file handle from pike.Handle.

Open lithdew opened this issue 4 years ago • 0 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).

lithdew avatar Nov 19 '20 10:11 lithdew