haskell / haskell/network

Socket type is incorrect on Windows

Open
#426 15 comments 0 reactions 1 assignee Claimed by @Mistuke View on GitHub
Windows
Dominant language
Haskell
Stars
366
Forks
210
Avg merge
22h 38m
Merged PRs (30d)
5

Description

`Socket` is defined as holding a `CInt`, but on Windows `SOCKET` is an unsigned 64 bit value, usually `UINT_PTR`. See [1] and [2] this means we may truncate a valid `SOCKET` to something invalid.

[1] https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/include/psdk_inc/_socket_types.h
[2] https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.