Пример #1
0
        public void DoConnect()
        {
            AsciiConnectAndGetServerPromptUnit connectUnit = new AsciiConnectAndGetServerPromptUnit();

            connectUnit.Finished += new AsciiProtocolUnitDelegate(ConnectFinished);
            StartUnit(Int32.MaxValue, connectUnit);
        }
Пример #2
0
        private void ConnectFinished(AsciiProtocolUnit unit)
        {
            AsciiConnectAndGetServerPromptUnit connectUnit = (AsciiConnectAndGetServerPromptUnit)unit;

            _serverPrompt = connectUnit.ServerPrompt;
            _state        = (connectUnit.Connected) ? NntpConnectionState.Connected : NntpConnectionState.NotConnected;
            if (_state == NntpConnectionState.NotConnected)
            {
                SetError(_serverPrompt);
            }
        }