| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Events.UDPSpec
Description
Tests for the UDP example event sink.
Synopsis
- spec :: Spec
- withUDPServerSocket :: (ListenSocket -> PortNumber -> IO a) -> IO a
Documentation
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).