• TcpServer
  • TcpServer Class

    (nymeaserver::TcpServer)

    This class represents the tcp server for nymead. More...

    Header: #include <TcpServer>
    Inherits: TransportInterface

    Public Functions

    TcpServer(const ServerConfiguration & configuration, const QSslConfiguration & sslConfiguration, QObject * parent = nullptr)
    ~TcpServer()
    QUrl serverUrl() const

    Reimplemented Public Functions

    virtual void sendData(const QUuid & clientId, const QByteArray & data)
    virtual void sendData(const QList<QUuid> & clients, const QByteArray & data)

    Public Slots

    void reconfigureServer(const ServerConfiguration & config)
    virtual void setServerName(const QString & serverName)
    virtual bool startServer()
    virtual bool stopServer()

    Additional Inherited Members

    Detailed Description

    This class represents the tcp server for nymead.

    The TCP server allows clients to connect to the JSON-RPC API.

    See also WebSocketServer and TransportInterface.

    Member Function Documentation

    TcpServer::TcpServer(const ServerConfiguration & configuration, const QSslConfiguration & sslConfiguration, QObject * parent = nullptr)

    Constructs a TcpServer with the given configuration, sslConfiguration and parent.

    See also ServerManager.

    TcpServer::~TcpServer()

    Destructor of this TcpServer.

    [slot] void TcpServer::reconfigureServer(const ServerConfiguration & config)

    Returns true if this TcpServer could be reconfigured with the given config.

    [virtual] void TcpServer::sendData(const QUuid & clientId, const QByteArray & data)

    Reimplemented from TransportInterface::sendData().

    Sending data to the client with the given clientId.

    [virtual] void TcpServer::sendData(const QList<QUuid> & clients, const QByteArray & data)

    Reimplemented from TransportInterface::sendData().

    Sending data to a list of clients.

    QUrl TcpServer::serverUrl() const

    Returns the URL of this server.

    [virtual slot] void TcpServer::setServerName(const QString & serverName)

    Reimplemented from TransportInterface::setServerName().

    Sets the name of this server to the given serverName.

    [virtual slot] bool TcpServer::startServer()

    Reimplemented from TransportInterface::startServer().

    Returns true if this TcpServer started successfully.

    See also TransportInterface::startServer().

    [virtual slot] bool TcpServer::stopServer()

    Reimplemented from TransportInterface::stopServer().

    Returns true if this TcpServer stopped successfully.

    See also TransportInterface::startServer().