trace-dispatcher
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Logging.Prometheus.NetworkRun

Description

Run a TCP server, with hardening against connection flooding

Synopsis

Documentation

data NetworkRunParams Source #

Parameters specifying how the TCP server should be run

Constructors

NetworkRunParams 

Fields

type TimeoutServer a = NetworkRunParams -> IO () -> Socket -> IO a Source #

mkTCPServerRunner :: NetworkRunParams -> Maybe HostName -> PortNumber -> TimeoutServer () -> IO (IO ()) Source #

Returns an IO action that will run a TCP server conforming to the run parameters. Will bind to localhost / loopback device only if no host name is specified. Will throw an exception when TCP server startup fails - the caller is responsible for appropriately reacting to that.