Poco::WebTunnel

class WebSocketFactory

File Information

Library: WebTunnel
Package: WebTunnel
Header: Poco/WebTunnel/LocalPortForwarder.h

Description

WebSocketFactory is used by LocalPortForwarder to create a Poco::Net::WebSocket instance for tunneling purposes.

Typically, the WebSocketFactory will set up credentials in the given Poco::Net::HTTPRequest object, then use Poco::Net::HTTPSessionFactory to create a Poco::Net::HTTPClientSession instance for connecting to the given URI.

Inheritance

Known Derived Classes: DefaultWebSocketFactory

Member Summary

Member Functions: createWebSocket

Types Aliases

Ptr

using Ptr = Poco::SharedPtr < WebSocketFactory >;

Constructors

WebSocketFactory

WebSocketFactory();

Creates the WebSocketFactory.

Destructor

~WebSocketFactory virtual

virtual ~WebSocketFactory();

Destroys the WebSocketFactory.

Member Functions

createWebSocket virtual

virtual Poco::Net::WebSocket * createWebSocket(
    const Poco::URI & uri,
    Poco::Net::HTTPRequest & request,
    Poco::Net::HTTPResponse & response
) = 0;

Creates and returns a Poco::Net::WebSocket connected to the given URI, using the given request and response objects.

Securely control IoT edge devices from anywhere   Connect a Device