steal_connection


Description:

[ Version ( since = "2.50" ) ]
public IOStream steal_connection (Message msg)

"Steals" the HTTP connection associated with msg from this.

This happens immediately, regardless of the current state of the connection, and msg's callback will not be called. You can steal the connection from a Message signal handler if you need to wait for part or all of the response to be received first.

Calling this function may cause msg to be freed if you are not holding any other reference to it.

Parameters:

this

a Session

msg

the message whose connection is to be stolen

Returns:

the IOStream formerly associated with msg (or null if msg was no longer associated with a connection). No guarantees are made about what kind of IOStream is returned.