MLLP.TCPContract behaviour (mllp v0.9.4)

Link to this section Summary

Link to this section Callbacks

Specs

close(socket :: :gen_tcp.socket()) :: :ok
Link to this callback

connect( address, port, options, timeout )

Specs

connect(
  address :: :inet.socket_address() | :inet.hostname(),
  port :: :inet.port_number(),
  options :: [:gen_tcp.connect_option()],
  timeout :: timeout()
) :: {:ok, :gen_tcp.socket()} | {:error, any()}
Link to this callback

recv(socket, length)

Specs

recv(socket :: :gen_tcp.socket(), length :: integer()) ::
  {:ok, any()} | {:error, any()}
Link to this callback

recv(socket, length, timeout)

Specs

recv(socket :: :gen_tcp.socket(), length :: integer(), timeout :: integer()) ::
  {:ok, any()} | {:error, any()}
Link to this callback

send(socket, packet)

Specs

send(socket :: :gen_tcp.socket(), packet :: iodata()) :: :ok | {:error, any()}