#include <icy/webrtc/support/wssignaller.h>Inherits:
SignallingInterface
SignallingInterface implementation using plain JSON over WebSocket.
| Return | Name | Description |
|---|---|---|
Signal< void(const std::string &)> | SendMessage |
Signal< void(const std::string &)> SendMessage| Return | Name | Description |
|---|---|---|
WebSocketSignaller explicit | ||
WebSocketSignaller | Deleted constructor. | |
void | sendSdp virtual | Send an SDP offer or answer to the remote peer. |
void | sendCandidate virtual | Send an ICE candidate to the remote peer. |
void | sendControl virtual | Send a control message to the remote peer. |
void | receive | |
void | setLocalPeerId inline | |
const std::string & | localPeerId const inline |
explicit
explicit WebSocketSignaller(const std::string & localPeerId)WebSocketSignaller(const WebSocketSignaller &) = deleteDeleted constructor.
virtual
virtual void sendSdp(const std::string & peerId, const std::string & type, const std::string & sdp)Send an SDP offer or answer to the remote peer.
peerId Remote peer identifier.
type "offer" or "answer".
sdp The SDP string.
virtual
virtual void sendCandidate(const std::string & peerId, const std::string & candidate, const std::string & mid)Send an ICE candidate to the remote peer.
peerId Remote peer identifier.
candidate The candidate string (from RTCIceCandidate).
mid The sdpMid value.
virtual
virtual void sendControl(const std::string & peerId, const std::string & type, const std::string & reason)Send a control message to the remote peer.
peerId Remote peer identifier.
type Control type: "init", "accept", "reject", "hangup".
reason Optional reason string (for reject/hangup).
void receive(const std::string & json)inline
inline void setLocalPeerId(const std::string & id)const inline
inline const std::string & localPeerId() const| Return | Name | Description |
|---|---|---|
std::string | _localPeerId | |
std::mutex | _mutex |
std::string _localPeerIdstd::mutex _mutex| Return | Name | Description |
|---|---|---|
void | sendJson |
void sendJson(const json::Value & msg)