reflex-backend-socket-0.2.0.0: Reflex bindings for TCP sockets

Copyright(c) 2018-2019 Commonwealth Scientific and Industrial Research Organisation
LicenseBSD3
Maintainerdave.laing.80@gmail.com, jack.kelly@data61.csiro.au
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Reflex.Backend.Socket.Connect

Description

Use connect to attempt a connection to a remote endpoint, and get an Event t (Either SetupError Socket) that tells you whether or not it worked.

Synopsis

Documentation

connect Source #

Arguments

:: (Reflex t, PerformEvent t m, TriggerEvent t m, PostBuild t m, MonadIO (Performable m), MonadIO m) 
=> Maybe HostName

Host to connect to. If Nothing, connect via loopback.

-> ServiceName

Service (port number or service name). See the manpage for getaddrinfo.

-> m (Event t (Either SetupError Socket))

This event will fire exactly once.

Connect to a remote endpoint. The connection happens in a background thread.