BlockIO() public method

public BlockIO ( ) : void
return void
示例#1
0
        public void Connect()
        {
            try
            {
                m_tcpClient = new TcpClient(m_host, m_port);

                logger.Debug("XMPP client is connected to " + m_host + ":" + m_port + ".");

                m_tcpWrappedStream = new WrappedStream(m_tcpClient.GetStream());
                XMPPInitialStream initialStream = new XMPPInitialStream(m_tcpWrappedStream);
                initialStream.Start(m_server, null, null);

                m_tcpWrappedStream.BlockIO();
                XMPPStreamTLSRequired();
                m_sslWrappedStream.BlockIO();
                XMPPStreamAuthenticated();
            }
            catch (Exception excp)
            {
                logger.Error("Exception XMPPClient.Connect. " + excp.Message);
            }
            finally
            {
                if (Disconnected != null)
                {
                    Disconnected();
                }
            }
        }
        public void Connect()
        {
            try
            {
                m_tcpClient = new TcpClient(m_host, m_port);

                logger.Debug("XMPP client is connected to " + m_host + ":" + m_port + ".");

                m_tcpWrappedStream = new WrappedStream(m_tcpClient.GetStream(), m_traceStream);
                XMPPInitialStream initialStream = new XMPPInitialStream(m_tcpWrappedStream);
                initialStream.Start(m_server, null, null);

                m_tcpWrappedStream.BlockIO();
                XMPPStreamTLSRequired();
                m_sslWrappedStream.BlockIO();
                XMPPStreamAuthenticated();
            }
            catch (Exception excp)
            {
                logger.Error("Exception XMPPClient.Connect. " + excp.Message);
            }
            finally
            {
                if (Disconnected != null)
                {
                    Disconnected();
                }
            }
        }