Poco::Remoting::Binary

class Listener

Library: Remoting/Binary
Package: Binary
Header: Poco/Remoting/Binary/Listener.h

Description

NetCOnf is a one object per Listener protocol.

Inheritance

Direct Base Classes: Poco::Remoting::Listener

All Base Classes: Poco::Remoting::Listener

Member Summary

Member Functions: getTransportId, invoke, registerObject, start, stop, unregisterObject

Inherited Functions: getLocalEndPoint, getTransportId, registerObject, start, stop, unregisterObject

Constructors

Listener

Listener(
    Poco::UInt16 port
);

Creates the Listener (non-SSL port used)

Listener

Listener(
    const Poco::Net::ServerSocket & sock
);

Creates the listener with the given ServerSocket. Use a Poco::Net::SecureServerSocket to enable SSL encryption.

Destructor

~Listener virtual

~Listener();

Destroys the Listener.

Member Functions

getTransportId virtual inline

const std::string & getTransportId() const;

Returns the transportId.

See also: Poco::Remoting::Listener::getTransportId()

invoke

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

registerObject

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.

start virtual inline

void start();

Starts accepting requests.

See also: Poco::Remoting::Listener::start()

stop virtual inline

void stop();

Stops accepting requests.

See also: Poco::Remoting::Listener::stop()

unregisterObject

void unregisterObject(
    Poco::AutoPtr < Poco::Remoting::RemoteObject > ptrObj
);