Library: Net
Package: Reactor
Header: Poco/Net/SocketNotifier.h
This class is used internally by SocketReactor to notify registered event handlers of socket events.
Direct Base Classes: Poco::RefCountedObject
All Base Classes: Poco::RefCountedObject
Member Functions: accepts, addObserver, countObservers, dispatch, hasObservers, removeObserver
Inherited Functions: duplicate, referenceCount, release
explicit SocketNotifier(
const Socket & socket
);
Creates the SocketNotifier for the given socket.
~SocketNotifier();
Destroys the SocketNotifier.
bool accepts(
SocketNotification * pNotification
);
Returns true if there is at least one observer for the given notification.
void addObserver(
SocketReactor * pReactor,
const Poco::AbstractObserver & observer
);
Adds the given observer.
std::size_t countObservers() const;
Returns the number of subscribers;
void dispatch(
SocketNotification * pNotification
);
Dispatches the notification to all observers.
bool hasObservers() const;
Returns true if there are subscribers.
void removeObserver(
SocketReactor * pReactor,
const Poco::AbstractObserver & observer
);
Removes the given observer.