haskell / haskell/network

WinIO

Open
#602 43 comments 0 reactions 1 assignee Claimed by @kazu-yamamoto View on GitHub
Dominant language
Haskell
Stars
366
Forks
210
Avg merge
22h 38m
Merged PRs (30d)
5

Description

@Mistuke I'm trying to understand whether or not I can support WinIO by myself.

I gathered patches so far: https://github.com/kazu-yamamoto/network/commits/win-io/

The key change is the `Socket` type:

```
#if defined(mingw32_HOST_OS)
type CSocket = SOCKET
#else
type CSocket = CInt
#endif

data Socket = Socket (IORef CSocket) CSocket {- for Show -}
```

If we can pass `CSocket` to `threadWaitRead`/`threadWaitWrite`, I guess most integration is done.

In4bf542bf1cdf2fa468457fc0af21333478293476 of GHC gitlab tree, you added the following:

```
threadWaitRead :: BHandle a => a -> IO ()
```

This is really promising but you reverted it in b3ad2a54bf775e1ca110b501894891d4ccff3d8f.
So, I cannot find any ways to pass `CSocket` to these functions.
Would you suggest how we can achieve the purpose?

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.