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

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

private Bind_Connect_End ( IAsyncResult ar ) : void
ar IAsyncResult
Результат void
        void Bind_Connect_End(IAsyncResult ar)
        {
            Bind_SO stateObj = (Bind_SO)ar.AsyncState;
            try
            {
                stateObj.UpdateContext();
                _socket.EndConnect(ar);

                //------------------------------------
                // Send CONNECT command
                //
                byte[] cmd = PrepareBindCmd(stateObj.BaseSocket);

                NStream.BeginWrite(
                    cmd, 
                    0, 
                    cmd.Length,
                    new AsyncCallback(Bind_Write_End),
                    stateObj);
            }
            catch(Exception e)
            {
                stateObj.Exception = e;
                stateObj.SetCompleted();
            }
        }