NDEVR
API Documentation
WebSocketConnectionFactory

A ConnectionBackend that allows the software to interface with QWebSocket for communicating with WebSocket devices. More...

Inheritance diagram for WebSocketConnectionFactory:
[legend]
Collaboration diagram for WebSocketConnectionFactory:
[legend]

Public Member Functions

virtual Buffer< ConnectionCategoryavailableConnectionCategories () override
 Returns the categories of connections this factory can provide.
virtual Buffer< ConnectionInfoavailableConnections (const ConnectionSearchParameters &params) override
 Discovers and returns available WebSocket connections matching the search parameters.
virtual ConnectionBackendcreateConnection (const ConnectionInfo &request) override
 Creates a new WebSocketConnection backend for the given connection info.
virtual bool handlesType (const StringView &request) const override
 Checks whether this factory handles the given connection type string.
Public Member Functions inherited from ConnectionFactory
virtual bool canConnectTo (const ConnectionInfo &request) const
 Checks whether this factory can establish a connection with the given info.

Additional Inherited Members

Static Public Member Functions inherited from ConnectionFactory
static Buffer< ConnectionCategoryAvailableConnectionCategories ()
 Returns all connection categories from all registered factories.
static Buffer< ConnectionInfoAvailableConnections (const ConnectionSearchParameters &params)
 Discovers available connections across all registered factories.
static ConnectionBackendCreateConnection (const ConnectionInfo &request)
 Creates a ConnectionBackend by searching all registered factories for one that handles the request.
static void RegisterConnectionFactory (ConnectionFactory *factory)
 Registers a ConnectionFactory so it can be used to create connections.
Static Protected Attributes inherited from ConnectionFactory
static Buffer< ConnectionFactory * > s_registered_factories
 All registered connection factories.

Detailed Description

A ConnectionBackend that allows the software to interface with QWebSocket for communicating with WebSocket devices.


WebSockets is a web technology providing full-duplex communications channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011. QWebSocket can both be used in a client application and server application.

See also
Connection, SocketConnection

A ConnectionFactory that enables the creation of a WebSocketConnection for interfacing with a QWebSocket

Definition at line 134 of file WebSocketConnection.h.

Member Function Documentation

◆ availableConnectionCategories()

virtual Buffer< ConnectionCategory > WebSocketConnectionFactory::availableConnectionCategories ( )
overridevirtual

Returns the categories of connections this factory can provide.

Returns
A buffer of ConnectionCategory values supported by this factory.

Implements ConnectionFactory.

◆ availableConnections()

virtual Buffer< ConnectionInfo > WebSocketConnectionFactory::availableConnections ( const ConnectionSearchParameters & params)
overridevirtual

Discovers and returns available WebSocket connections matching the search parameters.

Parameters
[in]paramsThe search criteria for discovering connections.
Returns
A buffer of ConnectionInfo objects describing available connections.

Implements ConnectionFactory.

◆ createConnection()

virtual ConnectionBackend * WebSocketConnectionFactory::createConnection ( const ConnectionInfo & request)
overridevirtual

Creates a new WebSocketConnection backend for the given connection info.

Parameters
[in]requestThe connection parameters for the new connection.
Returns
A pointer to the newly created ConnectionBackend.

Implements ConnectionFactory.

◆ handlesType()

virtual bool WebSocketConnectionFactory::handlesType ( const StringView & request) const
overridevirtual

Checks whether this factory handles the given connection type string.

Parameters
[in]requestThe connection type identifier to test.
Returns
True if this factory can create connections of the specified type.

Implements ConnectionFactory.


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