Tcp.Connection (gt_bridge v0.17.2)

Copy Markdown View Source

I am the TCP Connection for MsgPack messages

If you are looking for HTTP messages please use someone else.

Summary

Types

Shorthand type for socket.

Shorthand type for port number.

t()

I am the state of a TCP connection.

Functions

Returns a specification to start this module under a supervisor.

Types

hostname()

@type hostname() :: :inet.socket_address() | :inet.hostname()

Shorthand type for socket.

port_number()

@type port_number() :: :inet.port_number()

Shorthand type for port number.

t()

@type t() :: %Tcp.Connection{inferior: pid() | nil, socket: port() | nil}

I am the state of a TCP connection.

My fields contain information to facilitate the TCP connection with a remote node.

Fields

  • :socket - The socket of the connection.

Functions

child_spec(init_arg)

@spec child_spec([any()]) :: Supervisor.child_spec()

Returns a specification to start this module under a supervisor.

See Supervisor.

decode(x)

encode(x)

handle_tcp_in(bytes, local_node_id)

@spec handle_tcp_in(any(), String.t()) :: :ok

start_link(args)

@spec start_link([any()]) :: GenServer.on_start()