hydra-node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Events.UDPSpec

Description

Tests for the UDP example event sink.

Synopsis

Documentation

spec :: Spec Source #

withUDPServerSocket :: (ListenSocket -> PortNumber -> IO a) -> IO a Source #

Bind a UDP server socket on any free port and hand the assigned port to the action. Binding port 0 directly avoids probing for a free port with a separate socket, which is racy (and the previous TCP probe said nothing about UDP availability anyway).