Terminalwire.Server.Connection (Terminalwire v0.1.0)

Copy Markdown View Source

The server-role protocol state machine. Sans-IO: feed it an incoming frame with receive_frame/2, get back {new_state, directives}. A directive is one of:

  • {:send, frame} — write this frame to the transport
  • — a domain event for the application No sockets, no processes. MirrorsTerminalwire::V2::Server::Connection. The stateful I/O lives inTerminalwire.Server.Session`.

Summary

Functions

call(conn, resource, method, params \\ %{})

exit(conn, status \\ 0)

new(opts \\ [])

open_stream(conn, stream, mode \\ nil)

ready?(arg1)

receive_frame(conn, frame)

Feed one incoming frame. Returns {conn, directives}.