Esempio n. 1
0
    public bool Connect(string sAddress, int iPort, string sName)
    {
        if (m_theTansmitter.Connect(sAddress, iPort) == false)
        {
            Debug.Log("Connect to server failed!");
            return(false);
        }
        m_theTansmitter.SetHandleReceivedPacketEvent(_OnHandleReceivedPacket);
        m_sName = sName;

        LoginMessage msgLogin = new LoginMessage();

        msgLogin.m_sName = m_sName;
        m_theTansmitter.Send(msgLogin);

        Debug.Log("Connect to server Successed!");
        return(true);
    }