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).
Contents
Synopsis
- type ClientApp
- value runClient
- value runClientWith
- value runClientWithSocket
- value runClientWithStream
- value newClientConnection
- value createRequest
- data Protocol
- value defaultProtocol
- value checkServerResponse
- value streamToClientConnection
- 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
Check 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.