View Source Membrane.WebRTC.SimpleWebSocketServer (Membrane WebRTC plugin v0.19.0)

A simple WebSocket server spawned by Membrane.WebRTC.Source and Membrane.WebRTC.Sink. It accepts a single connection and passes the messages between the client and a Membrane element.

The messages sent and received by the server are JSON-encoded Membrane.WebRTC.SignalingChannel.json_data_message/0. Additionally, the server sends a {type: "keep_alive", data: ""} messages to prevent the WebSocket from being closed.

Examples of configuring and interacting with the server can be found in the examples directory.

Summary

Types

Options for the server.

Types

@type options() :: [ip: :inet.ip_address(), port: :inet.port_number()]

Options for the server.

The port is required, while the IP address defaults to {127, 0, 0, 1}.