Ice 3.9
C++ API Reference
Loading...
Searching...
No Matches

◆ ice_getConnectionAsync() [2/2]

std::function< void()> Ice::ObjectPrx::ice_getConnectionAsync ( std::function< void(Ice::ConnectionPtr)> response,
std::function< void(std::exception_ptr)> ex = nullptr,
std::function< void(bool)> sent = nullptr ) const

Gets the connection for this proxy.

If the proxy does not yet have an established connection or its connection is closed or being closed, it first attempts to create a new connection. For a fixed proxy, this function returns the connection this proxy is bound to, even when this connection is closed.

Parameters
responseThe response callback. The Ice runtime calls this function from an Ice thread pool thread. If you set InitializationData::executor, the executor determines the thread that executes this function. It accepts:
  • The connection for this proxy.
exThe exception callback. The Ice runtime calls this function from an Ice thread pool thread. If you set InitializationData::executor, the executor determines the thread that executes this function.
sentThe sent callback. The Ice runtime never calls this function: no request is sent to get a connection.
Returns
A function that can be called to cancel the invocation locally.