Home
WebRTC support helpers

SympleServerSignaller

Server-side Symple signaller for virtual peers and embedded apps.

SympleServerSignaller

#include <icy/webrtc/support/sympleserversignaller.h>
class SympleServerSignaller

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:39

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-12) 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).

List of all members

NameKindOwner
SympleServerSignallerfunctionDeclared here
~SympleServerSignallerfunctionDeclared here
SympleServerSignallerfunctionDeclared here
operator=functionDeclared here
sendSdpfunctionDeclared here
sendCandidatefunctionDeclared here
sendControlfunctionDeclared here
onMessagefunctionDeclared here
setRemoteAddressfunctionDeclared here
localAddressfunctionDeclared here
remoteAddressfunctionDeclared here
_servervariableDeclared here
_localAddressvariableDeclared here
_remoteAddressvariableDeclared here
_dispatchvariableDeclared here
_mutexvariableDeclared here
_pendingvariableDeclared here
_closingvariableDeclared here
sendfunctionDeclared here
sendNowfunctionDeclared here
flushPendingfunctionDeclared here
SdpReceivedvariableInherited from SignallingInterface
CandidateReceivedvariableInherited from SignallingInterface
ControlReceivedvariableInherited from SignallingInterface
~SignallingInterfacefunctionInherited from SignallingInterface
sendSdpfunctionInherited from SignallingInterface
sendCandidatefunctionInherited from SignallingInterface
sendControlfunctionInherited from SignallingInterface

Inherited from SignallingInterface

KindNameDescription
variableSdpReceivedFires when an SDP offer or answer arrives from a remote peer. Parameters: peerId, type ("offer"/"answer"), sdp.
variableCandidateReceivedFires when an ICE candidate arrives from a remote peer. Parameters: peerId, candidate, mid.
variableControlReceivedFires when a control message arrives from a remote peer. Parameters: peerId, type ("init"/"accept"/"reject"/"hangup"), reason.
function~SignallingInterface virtualDefaulted destructor.
functionsendSdp virtualSend an SDP offer or answer to the remote peer.
functionsendCandidate virtualSend an ICE candidate to the remote peer.
functionsendControl virtualSend a control message to the remote peer.

Public Methods

ReturnNameDescription
SympleServerSignaller
SympleServerSignallerDeleted constructor.
voidsendSdp virtual overrideSend an SDP offer or answer to the remote peer.
voidsendCandidate virtual overrideSend an ICE candidate to the remote peer.
voidsendControl virtual overrideSend a control message to the remote peer.
voidonMessage
voidsetRemoteAddress
const std::string &localAddress const inline
const std::string &remoteAddress const inline

SympleServerSignaller

SympleServerSignaller(smpl::Server & server, std::string localAddress, std::string remoteAddress = {})

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:42


SympleServerSignaller

SympleServerSignaller(const SympleServerSignaller &) = delete

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:47

Deleted constructor.


sendSdp

virtual override

virtual void sendSdp(const std::string & peerId, const std::string & type, const std::string & sdp) override

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:50

Send an SDP offer or answer to the remote peer.

Parameters

  • peerId Remote peer identifier.

  • type "offer" or "answer".

  • sdp The SDP string.

Reimplements

sendCandidate

virtual override

virtual void sendCandidate(const std::string & peerId, const std::string & candidate, const std::string & mid) override

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:54

Send an ICE candidate to the remote peer.

Parameters

  • peerId Remote peer identifier.

  • candidate The candidate string (from RTCIceCandidate).

  • mid The sdpMid value.

Reimplements

sendControl

virtual override

virtual void sendControl(const std::string & peerId, const std::string & type, const std::string & reason = {}) override

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:58

Send a control message to the remote peer.

Parameters

  • peerId Remote peer identifier.

  • type Control type: "init", "accept", "reject", "hangup".

  • reason Optional reason string (for reject/hangup).

Reimplements

onMessage

void onMessage(const json::Value & msg)

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:62


setRemoteAddress

void setRemoteAddress(std::string remoteAddress)

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:64


localAddress

const inline

inline const std::string & localAddress() const

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:65


remoteAddress

const inline

inline const std::string & remoteAddress() const

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:66

Private Attributes

ReturnNameDescription
smpl::Server &_server
std::string_localAddress
std::string_remoteAddress
Synchronizer_dispatch
std::mutex_mutex
std::deque< OutboundMessage >_pending
bool_closing

_server

smpl::Server & _server

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:81


_localAddress

std::string _localAddress

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:82


_remoteAddress

std::string _remoteAddress

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:83


_dispatch

Synchronizer _dispatch

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:84


_mutex

std::mutex _mutex

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:85


_pending

std::deque< OutboundMessage > _pending

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:86


_closing

bool _closing = false

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:87

Private Methods

ReturnNameDescription
voidsend
boolsendNow
voidflushPending

send

void send(const std::string & action, const std::string & to, const json::Value & data = {})

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:75


sendNow

bool sendNow(const std::string & to, const json::Value & msg)

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:78


flushPending

void flushPending()

Defined in src/webrtc/support/include/icy/webrtc/support/sympleserversignaller.h:79