View Source Membrane.TCP.Source (Membrane TCP plugin v0.3.0)
Element that reads packets from a TCP socket and sends their payloads through the output pad.
Element options
Passed via struct Membrane.TCP.Source.t/0
connection_side
:server | :client | {:client, server_address :: :inet.ip_address(), server_port_no :: :inet.port_number()}
Required
Determines whether this element will operate like a server or a client when establishing TCP connection. In case of client-side connection server address and port number are required, unlesslocal_socket
is provided.local_address
:inet.socket_address()
Default value:
:any
An IP Address from which the socket will connect or will listen on. It allows to choose which network interface to use if there's more than one.local_port_no
:inet.port_number()
Default value:
0
A TCP port number used when connecting to a listening socket or starting a listening socket. If not specified any free port is chosen.local_socket
:gen_tcp.socket() | nil
Default value:
nil
Already connected TCP socket, if provided will be used instead of creating and connecting a new one.recv_buffer_size
pos_integer()
Default value:
1048576
Size of the receive buffer. Packages of size greater than this buffer will be truncated
Pads
:output
Accepted formats:
%RemoteStream{type: :bytestream}
Direction: | :output |
Availability: | :always |
Flow control: | :manual |
Demand unit: | nil |
Summary
Types
Struct containing options for Membrane.TCP.Source
Types
@type t() :: %Membrane.TCP.Source{ connection_side: :server | :client | {:client, server_address :: :inet.ip_address(), server_port_no :: :inet.port_number()}, local_address: :inet.socket_address(), local_port_no: :inet.port_number(), local_socket: :gen_tcp.socket() | nil, recv_buffer_size: pos_integer() }
Struct containing options for Membrane.TCP.Source
Functions
@spec options() :: keyword()
Returns description of options available for this module