fort::hermes::NetworkContext

class NetworkContext : public fort::hermes::Context

A Context that reads FrameReadout from a live leto instance.

Public Functions

NetworkContext(const std::string &host, int port = 4002, bool nonblocking = false)

Opens a leto broadcast.

Parameters
  • host – the host to connect to

  • port – the port to connect to, usually 4002

  • nonblocking – if true the connection will be non-blocking, meaning that WouldBlock can be thrown if no message are ready when Reading

Throws
  • asio::system_error – if no connection could be made

  • InternalError – if no valid header is found in the stream

virtual void Read(fort::hermes::FrameReadout *ro)

Reads a FrameReadout from the Context.

Parameters

ro – the FrameReadout to parse to

Throws