internal virtual void ConnectionCallback(object owningObject, Exception e, Socket socket, IPAddress address)
{
GlobalLog.Assert(owningObject == Owner || Owner == null, "PooledStream::ConnectionCallback|Owner is not the same as expected.");
object result = null;
if (e != null) {
m_Initalizing = false;
result = e;
} else {
try {
m_NetworkStream.InitNetworkStream(socket, FileAccess.ReadWrite);
result = this;
}
catch (Exception ex)
{
if (NclUtilities.IsFatal(ex))
throw;
result = ex;
}
catch {
throw;
}
m_ServerAddress = address;
m_Initalizing = false;
m_JustConnected = true;
}
if (m_AsyncCallback != null) {
m_AsyncCallback(owningObject, result);
}
m_AbortSocket = null;
m_AbortSocket6 = null;
}