In Ice manual(2.1.1), it says:
but i can not figure anything about the results of the outgoing requests when the Client initiates closure gracefully.Gracefully closing a connection occurs in stages:
1) In the process that initiates closure, any incoming requests that are in progress
are allowed to complete, but any subsequent requests are silently discarded.
2) After the incoming requests have completed, a close connection message is
sent to the peer.
3) Upon receipt of a close connection message, the Ice run time in the peer closes
its end of the connection. Any outgoing requests still pending on that connection
fail with a CloseConnectionException. This exception indicates to the
Ice run time that it is safe to retry those requests (unless automatic retries are
disabled).
4) After detecting that the peer has closed the connection, the initiating Ice run
time closes the connection.
For example,there is a client which has one object proxy. The client's four threads issue a separate request at differenct time(time1 < time2 < time3 < time4):
I know that at time4, thread4 will get a CloseConnectionException, but how about thread1's requestA and thread2's requestB ?Code:thread1 at time1: send requestA to Server thread2 at time2: send requestB to Server (suppose up to now, Server doest not send back responses of responseA or responseB to Client) thread3 at time3: Ice::ObjectPrx proxy = ... Ice::ConnectionPtr conn = proxy->ice_connection(); conn->close(false); //gracefully close connection thread4 at time4: send requestC to Server

Reply With Quote