Library: RemotingNG/TCP
Package: TCP
Header: Poco/RemotingNG/TCP/Listener.h
The RemotingNG Listener implementation for the TCP transport.
Direct Base Classes: Poco::RemotingNG::EventListener
All Base Classes: Poco::RefCountedObject, Poco::RemotingNG::EventListener, Poco::RemotingNG::Listener
Member Functions: connectionManager, createURI, findEventSubscriber, getEventSubscriptionTimeout, getTimeout, handlesURI, protocol, registerObject, setEventSubscriptionTimeout, setTimeout, start, stop, subscribeToEvents, unregisterObject, unsubscribeFromEvents
Inherited Functions: createURI, duplicate, endPoint, handlesURI, protocol, referenceCount, registerObject, release, start, stop, subscribeToEvents, unregisterObject, unsubscribeFromEvents
typedef Poco::AutoPtr < Listener > Ptr;
Listener(
ConnectionManager & connectionManager = ConnectionManager::defaultManager ()
);
Creates a passive Event Listener.
This method is used to set up a passive Event Listener on the client. No TCPServer will be created.
Listener(
const std::string & endPoint,
ConnectionManager & connectionManager = ConnectionManager::defaultManager ()
);
Creates a Listener for the given endpoint, which must be in <host>:<port> format.
This method will create a Poco::Net::ServerSocket, bind it to the given endpoint address, and set up a TCPServer instance for accepting incoming connections.
Listener(
const std::string & endPoint,
Poco::Net::TCPServerParams::Ptr pParams,
ConnectionManager & connectionManager = ConnectionManager::defaultManager ()
);
Creates a Listener for the given endpoint, which must be in <host>:<port> format.
This method will create a Poco::Net::ServerSocket, bind it to the given endpoint address, and set up a TCPServer instance (using the given params) for accepting incoming connections.
Listener(
const std::string & endPoint,
const Poco::Net::ServerSocket & socket,
Poco::Net::TCPServerParams::Ptr pParams,
ConnectionManager & connectionManager = ConnectionManager::defaultManager ()
);
Creates a Listener for the given endpoint, which must be in <host>:<port> format.
This method will use the given server socket, and set up a TCPServer instance (using the given params) for accepting incoming connections.
Note that the given server socket can be a Poco::Net::SecureServerSocket in order to set up a secure connection.
~Listener();
Destroys the Listener.
ConnectionManager & connectionManager();
Returns the ConnectionManager used by the Listener.
std::string createURI(
const Poco::RemotingNG::Identifiable::TypeId & typeId,
const Poco::RemotingNG::Identifiable::ObjectId & objectId
);
Poco::RemotingNG::EventSubscriber::Ptr findEventSubscriber(
const std::string & path
) const;
Poco::Timespan getEventSubscriptionTimeout() const;
Returns the timeout for event subscriptions.
Poco::Timespan getTimeout() const;
Returns the receive timeout for connections.
bool handlesURI(
const std::string & uri
);
See also: Poco::RemotingNG::Listener::handlesURI()
const std::string & protocol() const;
See also: Poco::RemotingNG::Listener::protocol()
void registerObject(
Poco::RemotingNG::RemoteObject::Ptr pRemoteObject,
Poco::RemotingNG::Skeleton::Ptr pSkeleton
);
void setEventSubscriptionTimeout(
Poco::Timespan timeout
);
Sets the timeout for event subscriptions.
void setTimeout(
Poco::Timespan timeout
);
Sets the receive timeout for connections.
void start();
See also: Poco::RemotingNG::Listener::start()
void stop();
See also: Poco::RemotingNG::Listener::stop()
void subscribeToEvents(
Poco::RemotingNG::EventSubscriber::Ptr pEventSubscriber
);
void unregisterObject(
Poco::RemotingNG::RemoteObject::Ptr pRemoteObject
);
void unsubscribeFromEvents(
Poco::RemotingNG::EventSubscriber::Ptr pEventSubscriber
);