Poco::OSP::WebEvent

class WebEventServiceImpl

File Information

Library: OSP/WebEvent
Package: WebEvent
Header: Poco/OSP/WebEvent/WebEventServiceImpl.h

Inheritance

Direct Base Classes: WebEventService

All Base Classes: Poco::OSP::Service, WebEventService, Poco::RefCountedObject

Member Summary

Member Functions: addSubscriber, addSubscriberImpl, isA, notify, notifyImpl, preflightRequest, receive, receiveImpl, removeSubscriber, removeSubscriberImpl, runMain, runWorker, send, sendImpl, shutdown, shutdownImpl, subjectNotified, subscribe, subscribeImpl, subscriberCount, type, unsubscribe, unsubscribeImpl, unwatchSocketImpl, watchSocketImpl

Inherited Functions: duplicate, isA, notify, referenceCount, release, subjectNotified, subscriberCount, type

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < WebEventServiceImpl >;

Constructors

WebEventServiceImpl

WebEventServiceImpl(
    Poco::OSP::BundleContext::Ptr pContext,
    int maxSockets,
    int workerCount
);

Creates the WebEventServiceImpl.

Destructor

~WebEventServiceImpl virtual

~WebEventServiceImpl();

Destroys the WebEventServiceImpl.

Member Functions

isA virtual

bool isA(
    const std::type_info & otherType
) const;

notify virtual

void notify(
    const std::string & subjectName,
    const std::string & data
);

subjectNotified virtual

Poco::BasicEvent < const NotificationEvent > & subjectNotified(
    const std::string & subject
);

subscriberCount virtual

int subscriberCount(
    const std::string & subject
);

type virtual

const std::type_info & type() const;

addSubscriber protected

void addSubscriber(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS
);

addSubscriberImpl protected

void addSubscriberImpl(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS
);

notifyImpl protected

void notifyImpl(
    const std::string & subjectName,
    const std::string & data
);

preflightRequest protected

void preflightRequest(
    Poco::Net::HTTPServerRequest & request
);

receive protected

void receive(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS
);

receiveImpl protected

void receiveImpl(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS
);

removeSubscriber protected

void removeSubscriber(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    bool clientShutdown
);

removeSubscriberImpl protected

void removeSubscriberImpl(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    bool clientShutdown
);

runMain protected

void runMain();

runWorker protected

void runWorker();

send protected

void send(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    const std::string & message
);

sendImpl protected

void sendImpl(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    const std::string & message
);

shutdown protected

void shutdown(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    Poco::UInt16 statusCode,
    const std::string & statusMessage,
    bool passive
);

shutdownImpl protected

void shutdownImpl(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    Poco::UInt16 statusCode,
    const std::string & statusMessage,
    bool passive
);

subscribe protected

void subscribe(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    const std::set < std::string > & subjectNames
);

subscribeImpl protected

void subscribeImpl(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    const std::set < std::string > & subjectNames
);

unsubscribe protected

void unsubscribe(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    const std::set < std::string > & subjectNames
);

unsubscribeImpl protected

void unsubscribeImpl(
    Poco::SharedPtr < Poco::Net::WebSocket > pWS,
    const std::set < std::string > & subjectNames
);

unwatchSocketImpl protected

void unwatchSocketImpl(
    const Poco::Net::Socket & socket
);

watchSocketImpl protected

void watchSocketImpl(
    const Poco::Net::Socket & socket
);

Securely control IoT edge devices from anywhere   Connect a Device