A client application interacting with a single server. Once this IO action finished, the underlying socket is closed automatically.
Modulewebsockets-0.13.0.0Haskell2010
Network.WebSockets.Client
This part of the library provides you with utilities to create WebSockets clients (in addition to servers).
- 2 types
- 9 values
- Packagewebsockets-0.13.0.0
- Exports11
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceClient.hs
runClientWith runClientWithSocket runClientWithStream newClientConnection :: StreamStream that will be used by the new Connection.
-> StringHost
-> StringPath
-> ConnectionOptionsConnection options
-> HeadersCustom headers to send
-> IO Connection
Build a new Connection from the client's point of view.
WARNING: Be sure to call close on the given Stream after you are done using the Connection in order to properly close the communication channel. runClientWithStream handles this for you, prefer to use it when possible.
Low level functionality
5 declarationsCheck the response from the server. Throws OtherHandshakeException on failure
Build a Connection from a pre-established stream with already finished handshake.
NB: this will not perform any handshaking.