WebRTC support helpers

SympleServerSignaller

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

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

class SympleServerSignaller

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

This adapter sends signalling messages through a smpl::Server on behalf of a local virtual peer address, and accepts inbound Symple call messages through onMessage().

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
~SympleServerSignaller override
SympleServerSignallerDeleted constructor.
SympleServerSignaller &operator=Deleted assignment operator.
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

override

~SympleServerSignaller() override

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


SympleServerSignaller

SympleServerSignaller(const SympleServerSignaller &) = delete

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

Deleted constructor.


operator=

SympleServerSignaller & operator=(const SympleServerSignaller &) = delete

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

Deleted assignment operator.


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.

Reimplements

Parameters

ParameterTypeDescription
peerIdconst std::string &Remote peer identifier.
typeconst std::string &"offer" or "answer".
sdpconst std::string &The SDP string.

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.

Reimplements

Parameters

ParameterTypeDescription
peerIdconst std::string &Remote peer identifier.
candidateconst std::string &The candidate string (from RTCIceCandidate).
midconst std::string &The sdpMid value.

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.

Reimplements

Parameters

ParameterTypeDescription
peerIdconst std::string &Remote peer identifier.
typeconst std::string &Control type: "init", "accept", "reject", "hangup".
reasonconst std::string &Optional reason string (for reject/hangup).

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

Type: smpl::Server &

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


_localAddress

std::string _localAddress

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


_remoteAddress

std::string _remoteAddress

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


_dispatch

Synchronizer _dispatch

Type: Synchronizer

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


_mutex

std::mutex _mutex

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


_pending

std::deque< OutboundMessage > _pending

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


_closing

bool _closing = false

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

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:77


sendNow

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

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


flushPending

void flushPending()

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