A listener or connection. Equivalent to NkPACKET's #nkport{}.
local_ip/local_port: the address of our socket.remote_ip/remote_port: the peer,nilfor listeners. For UDP, a port with a remote address is the listener socket "connected" to a peer.listen_ip/listen_port: the listener this port belongs to (the one used as base for outgoing connections), to be used inViaandContactheaders.pid: the owner process.handler:{module, arg}receiving the messages, seeCaracola.Transport.Handler.
Summary
Types
A connection or listening port: transport, local, remote and listen addresses, its process and handler.
A transport protocol of a port.
Types
@type t() :: %Caracola.Transport.Port{ handler: Caracola.Transport.Handler.t() | nil, listen_ip: :inet.ip_address() | nil, listen_port: :inet.port_number() | nil, local_ip: :inet.ip_address() | nil, local_port: :inet.port_number() | nil, pid: pid() | nil, remote_ip: :inet.ip_address() | nil, remote_port: :inet.port_number() | nil, service: term(), socket: term(), transport: transport() }
A connection or listening port: transport, local, remote and listen addresses, its process and handler.
@type transport() :: :udp | :tcp | :tls | :ws | :wss
A transport protocol of a port.