Tailscale.Tcp.Listener (Tailscale v0.3.3)

View Source

Tailscale TCP listening socket functionality.

Summary

Types

t()

A TCP listener waiting for incoming connections.

Functions

Accept an incoming connection on the socket, yielding a connected Tailscale.Tcp.Stream.

Get the local address on which this listener is bound.

Types

t()

@opaque t()

A TCP listener waiting for incoming connections.

Functions

accept(res)

@spec accept(t()) :: {:ok, Tailscale.Tcp.Stream.t()} | {:error, any()}

Accept an incoming connection on the socket, yielding a connected Tailscale.Tcp.Stream.

Blocks until a connection is ready.

local_addr(listener)

@spec local_addr(t()) :: {:inet.ip_address(), :inet.port_number()}

Get the local address on which this listener is bound.