riemannx v1.0.1 Riemannx.Connections.TCP View Source

Using the TCP connection will only send traffic via TCP, all traffic can be sent via TCP as opposed to UDP where you are limit by packet size, there is however an overhead penalty using purely TCP which is why the combined connection is the recommended default.

Configuration

In order to use the TCP connection all you need to set is the :tcp_port the server is listening on and the :host name of the server.

As the TCP only connection is not default you should also specify this as the worker module:

config :riemannx, [
  host: "localhost",
  tcp_port: 5552,
  worker_module: Riemannx.Connections.TCP
]

Link to this section Summary

Link to this section Types

Link to this type t() View Source
t() :: %Riemannx.Connections.TCP{host: binary(), tcp_port: integer(), tcp_socket: :gen_tcp.socket() | nil}

Link to this section Functions

Link to this function start_link(args) View Source
start_link(Keyword.t()) :: {:ok, pid()}