SympleServerSignaller
SympleServerSignaller
#include <icy/webrtc/support/sympleserversignaller.h>Inherits:
SignallingInterface
Server-side Symple signaller for virtual peers and embedded apps.
This adapter sends signalling messages through a [smpl::Server](icy-smpl-Server.html#server-11) on behalf of a local virtual peer address, and accepts inbound Symple call messages through [onMessage()](#onmessage-2).
The remote peer identifier on this signalling boundary is the full Symple address string (user|id).
Public Methods
| Return | Name | Description |
|---|---|---|
SympleServerSignaller | ||
SympleServerSignaller | 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 | onMessage | |
void | setRemoteAddress | |
const std::string & | localAddress const inline | |
const std::string & | remoteAddress const inline |
SympleServerSignaller
SympleServerSignaller(smpl::Server & server, std::string localAddress, std::string remoteAddress)SympleServerSignaller
SympleServerSignaller(const SympleServerSignaller &) = deleteDeleted constructor.
sendSdp
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.
Parameters
peerIdRemote peer identifier.type"offer" or "answer".sdpThe SDP string.
sendCandidate
virtual
virtual void sendCandidate(const std::string & peerId, const std::string & candidate, const std::string & mid)Send an ICE candidate to the remote peer.
Parameters
peerIdRemote peer identifier.candidateThe candidate string (from RTCIceCandidate).midThe sdpMid value.
sendControl
virtual
virtual void sendControl(const std::string & peerId, const std::string & type, const std::string & reason)Send a control message to the remote peer.
Parameters
peerIdRemote peer identifier.typeControl type: "init", "accept", "reject", "hangup".reasonOptional reason string (for reject/hangup).
onMessage
void onMessage(const json::Value & msg)setRemoteAddress
void setRemoteAddress(std::string remoteAddress)localAddress
const inline
inline const std::string & localAddress() constremoteAddress
const inline
inline const std::string & remoteAddress() constPrivate Attributes
| Return | Name | Description |
|---|---|---|
smpl::Server & | _server | |
std::string | _localAddress | |
std::string | _remoteAddress | |
Synchronizer | _dispatch | |
std::mutex | _mutex | |
std::deque< OutboundMessage > | _pending | |
bool | _closing |
_server
smpl::Server & _server_localAddress
std::string _localAddress_remoteAddress
std::string _remoteAddress_dispatch
Synchronizer _dispatch_mutex
std::mutex _mutex_pending
std::deque< OutboundMessage > _pending_closing
bool _closing = falsePrivate Methods
| Return | Name | Description |
|---|---|---|
void | send | |
bool | sendNow | |
void | flushPending |
send
void send(const std::string & action, const std::string & to, const json::Value & data)sendNow
bool sendNow(const std::string & to, const json::Value & msg)flushPending
void flushPending()