hyperion.ng
Signals | Public Member Functions | Friends | List of all members
SSDPServer Class Reference

The SSDP Server sends and receives (parses) SSDP requests. More...

#include <SSDPServer.h>

Inheritance diagram for SSDPServer:
SSDPHandler

Signals

void msearchRequestReceived (const QString &target, const QString &mx, const QString address, const quint16 &port)
 Emits whenever a new SSDP search "man : ssdp:discover" is received along with the service type. More...
 

Public Member Functions

 SSDPServer (QObject *parent=nullptr)
 Construct the server, listen on default ssdp address/port with multicast. More...
 
void initServer ()
 Prepare server after thread start.
 
bool start ()
 Start SSDP. More...
 
void stop ()
 Stop SSDP.
 
void sendMSearchResponse (const QString &st, const QString &senderIp, const quint16 &senderPort)
 Send an answer to mSearch requester. More...
 
void sendByeBye (const QString &st)
 Send ByeBye notification (on SSDP stop) (repeated 3 times) More...
 
void sendAlive (const QString &st)
 Send a NOTIFY msg on SSDP startup to notify our presence (repeated 3 times) More...
 
void sendUpdate (const QString &st)
 Send a NOTIFY msg as ssdp:update to notify about changes. More...
 
void setDescriptionAddress (const QString &addr)
 Overwrite description address. More...
 
void setFlatBufPort (const quint16 &port)
 set new flatbuffer server port
 

Friends

class SSDPHandler
 

Detailed Description

The SSDP Server sends and receives (parses) SSDP requests.

Constructor & Destructor Documentation

§ SSDPServer()

SSDPServer::SSDPServer ( QObject *  parent = nullptr)

Construct the server, listen on default ssdp address/port with multicast.

Parameters
parentThe parent object

Member Function Documentation

§ msearchRequestReceived

void SSDPServer::msearchRequestReceived ( const QString &  target,
const QString &  mx,
const QString  address,
const quint16 &  port 
)
signal

Emits whenever a new SSDP search "man : ssdp:discover" is received along with the service type.

Parameters
targetThe ST service type
mxAnswer with delay in s
addressThe ip of the caller
portThe port of the caller

§ sendAlive()

void SSDPServer::sendAlive ( const QString &  st)

Send a NOTIFY msg on SSDP startup to notify our presence (repeated 3 times)

Parameters
stThe search target

§ sendByeBye()

void SSDPServer::sendByeBye ( const QString &  st)

Send ByeBye notification (on SSDP stop) (repeated 3 times)

Parameters
stSearch target

§ sendMSearchResponse()

void SSDPServer::sendMSearchResponse ( const QString &  st,
const QString &  senderIp,
const quint16 &  senderPort 
)

Send an answer to mSearch requester.

Parameters
stthe searchTarget
senderIpIp address of the sender
senderPortThe port of the sender

§ sendUpdate()

void SSDPServer::sendUpdate ( const QString &  st)

Send a NOTIFY msg as ssdp:update to notify about changes.

Parameters
stThe search target

§ setDescriptionAddress()

void SSDPServer::setDescriptionAddress ( const QString &  addr)
inline

Overwrite description address.

Parameters
addrnew address

§ start()

bool SSDPServer::start ( )

Start SSDP.

Returns
false if already running or bind failure

The documentation for this class was generated from the following files: