Library: Remoting/Binary
Package: Binary
Header: Poco/Remoting/Binary/Listener.h
NetCOnf is a one object per Listener protocol.
Direct Base Classes: Poco::Remoting::Listener
All Base Classes: Poco::Remoting::Listener
Member Functions: getTransportId, invoke, registerObject, start, stop, unregisterObject
Inherited Functions: getLocalEndPoint, getTransportId, registerObject, start, stop, unregisterObject
Listener(
Poco::UInt16 port
);
Creates the Listener (non-SSL port used)
Listener(
const Poco::Net::ServerSocket & sock
);
Creates the listener with the given ServerSocket. Use a Poco::Net::SecureServerSocket to enable SSL encryption.
~Listener();
Destroys the Listener.
const std::string & getTransportId() const;
Returns the transportId.
bool invoke(
Poco::Net::SocketInputStream & inStream,
Poco::Net::SocketOutputStream & outStream,
Poco::Remoting::Transport & trans
);
Returns false if a fatal error occurs, fatal errors are errors which require to close the connection immediately, an exception while executing is not fatal and will be consumed by this method
void registerObject(
Poco::AutoPtr < Poco::Remoting::RemoteObject > ptrObj,
Poco::AutoPtr < Poco::Remoting::Skeleton > ptrSkel,
const Poco::Remoting::Identifiable::ObjectId & oid,
const Poco::Remoting::Identifiable::TypeId & tid,
bool secure
);
Adds an object to the listener. Depending on the protocol, the Listener can opt to let the ORB handle all invocations (i.e we have a protocol where we can send the fullURI with the request, which allows to implement a requesthandler that simply calls ORB::invoke. In this case, registerObject and unregisterObject can have an empty implementation.
void start();
Starts accepting requests.
See also: Poco::Remoting::Listener::start()
void stop();
Stops accepting requests.
See also: Poco::Remoting::Listener::stop()
void unregisterObject(
Poco::AutoPtr < Poco::Remoting::RemoteObject > ptrObj
);