Beispiel #1
0
    public PollIO( )
    {
        if (m_poSession == null)
        {
            m_poSession = new NetSession(this);
        }

        if (readMsgCallBack == null)
        {
            readMsgCallBack = new ReadMsgCallBack(asyncread);
        }

        m_bRun = true;
    }
Beispiel #2
0
    public void UnInit()
    {
        m_bRun = false;
        stop();

        if (m_poSession != null)
        {
            m_poSession.Uninit();
            m_poSession = null;
        }
        if (readMsgCallBack != null)
        {
            readMsgCallBack = null;
        }

        myTcpClient.Close();
    }