private void DoConnectCallBack(IAsyncResult ar) { try { mClient.EndConnect(ar); mIoState = new IoClientState(this, mBufferSize, mClient); mIoState.SetStream(mClient.GetStream()); mHeader.SessionOpened(this); mIoState.BeginRead(); } catch (Exception ex) { mHeader.SessionException(this, ex); } }