BytesRoad.Net.Sockets.Socket_Socks4.Connect_Write_End C# (CSharp) Метод

Connect_Write_End() приватный Метод

private Connect_Write_End ( IAsyncResult ar ) : void
ar IAsyncResult
Результат void
        void Connect_Write_End(IAsyncResult ar)
        {
            Connect_SO stateObj = (Connect_SO)ar.AsyncState;
            try
            {
                stateObj.UpdateContext();
                NStream.EndWrite(ar);

                //------------------------------------
                // Read the response from proxy server. 
                //
                NStream.BeginRead(
                    _response, 
                    0, 
                    8, 
                    new AsyncCallback(Connect_Read_End),
                    stateObj);
            }
            catch(Exception e)
            {
                stateObj.Exception = e;
                stateObj.SetCompleted();
            }
        }