ianmackenzie / ianmackenzie/elm-script

Add WebSocket support

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Elm
Stars
34
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Something like

```elm
module Script.WebSocket

type Connection

-- Connection got closed somehow, etc.
type Error

-- Connect to a URL (and keep the connection alive)
connect : String -> NetworkConnection -> Connection

-- Send a message over a connection
send : String -> Connection -> Script Error ()

-- Wait for an incoming message
wait : Connection -> Script Error String

-- Close a connection
disconnect : Connection -> Script x ()
```

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.