WebSocketSignaller
WebSocketSignaller
#include <icy/webrtc/support/wssignaller.h>class WebSocketSignallerDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:29
Inherits:
SignallingInterface
SignallingInterface implementation using plain JSON over WebSocket.
List of all members
| Name | Kind | Owner |
|---|---|---|
SendMessage | variable | Declared here |
WebSocketSignaller | function | Declared here |
~WebSocketSignaller | function | Declared here |
WebSocketSignaller | function | Declared here |
operator= | function | Declared here |
sendSdp | function | Declared here |
sendCandidate | function | Declared here |
sendControl | function | Declared here |
receive | function | Declared here |
setLocalPeerId | function | Declared here |
localPeerId | function | Declared here |
_localPeerId | variable | Declared here |
_mutex | variable | Declared here |
sendJson | function | Declared here |
SdpReceived | variable | Inherited from SignallingInterface |
CandidateReceived | variable | Inherited from SignallingInterface |
ControlReceived | variable | Inherited from SignallingInterface |
~SignallingInterface | function | Inherited from SignallingInterface |
sendSdp | function | Inherited from SignallingInterface |
sendCandidate | function | Inherited from SignallingInterface |
sendControl | function | Inherited from SignallingInterface |
Inherited from SignallingInterface
| Kind | Name | Description |
|---|---|---|
variable | SdpReceived | Fires when an SDP offer or answer arrives from a remote peer. Parameters: peerId, type ("offer"/"answer"), sdp. |
variable | CandidateReceived | Fires when an ICE candidate arrives from a remote peer. Parameters: peerId, candidate, mid. |
variable | ControlReceived | Fires when a control message arrives from a remote peer. Parameters: peerId, type ("init"/"accept"/"reject"/"hangup"), reason. |
function | ~SignallingInterface virtual | Defaulted destructor. |
function | sendSdp virtual | Send an SDP offer or answer to the remote peer. |
function | sendCandidate virtual | Send an ICE candidate to the remote peer. |
function | sendControl virtual | Send a control message to the remote peer. |
Public Attributes
| Return | Name | Description |
|---|---|---|
Signal< void(const std::string &)> | SendMessage |
SendMessage
Signal< void(const std::string &)> SendMessageDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:52
Public Methods
| Return | Name | Description |
|---|---|---|
WebSocketSignaller explicit | ||
WebSocketSignaller | Deleted constructor. | |
void | sendSdp virtual override | Send an SDP offer or answer to the remote peer. |
void | sendCandidate virtual override | Send an ICE candidate to the remote peer. |
void | sendControl virtual override | Send a control message to the remote peer. |
void | receive | |
void | setLocalPeerId inline | |
const std::string & | localPeerId const inline |
WebSocketSignaller
explicit
explicit WebSocketSignaller(const std::string & localPeerId = {})Defined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:32
WebSocketSignaller
WebSocketSignaller(const WebSocketSignaller &) = deleteDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:35
Deleted constructor.
sendSdp
virtual override
virtual void sendSdp(const std::string & peerId, const std::string & type, const std::string & sdp) overrideDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:38
Send an SDP offer or answer to the remote peer.
Parameters
peerIdRemote peer identifier.type"offer" or "answer".sdpThe SDP string.
Reimplements
sendCandidate
virtual override
virtual void sendCandidate(const std::string & peerId, const std::string & candidate, const std::string & mid) overrideDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:42
Send an ICE candidate to the remote peer.
Parameters
peerIdRemote peer identifier.candidateThe candidate string (from RTCIceCandidate).midThe sdpMid value.
Reimplements
sendControl
virtual override
virtual void sendControl(const std::string & peerId, const std::string & type, const std::string & reason = {}) overrideDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:46
Send a control message to the remote peer.
Parameters
peerIdRemote peer identifier.typeControl type: "init", "accept", "reject", "hangup".reasonOptional reason string (for reject/hangup).
Reimplements
receive
void receive(const std::string & json)Defined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:50
setLocalPeerId
inline
inline void setLocalPeerId(const std::string & id)Defined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:54
localPeerId
const inline
inline const std::string & localPeerId() constDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:55
Private Attributes
| Return | Name | Description |
|---|---|---|
std::string | _localPeerId | |
std::mutex | _mutex |
_localPeerId
std::string _localPeerIdDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:60
_mutex
std::mutex _mutexDefined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:61
Private Methods
| Return | Name | Description |
|---|---|---|
void | sendJson |
sendJson
void sendJson(const json::Value & msg)Defined in src/webrtc/support/include/icy/webrtc/support/wssignaller.h:58
