Example #1
0
    private void CallBack(bool isSuccess)
    {
        if (!isSuccess)
        {
            Debug.LogWarning("失败了卧槽" + m_SocketHandle.ToString());
            return;
        }
        m_isConnect = true;
        m_Timer     = Time.time;
        OP_PLAYER_CONNECT_GET proto = new OP_PLAYER_CONNECT_GET();

        proto.passportId = m_Account.passportId;
        proto.token      = m_Account.token;
        proto.latitude   = LPSManager.Instance.Latitude;
        proto.longitude  = LPSManager.Instance.Longitude;
        NetWorkSocket.Instance.Send(proto.encode(), OP_PLAYER_CONNECT_GET.CODE, m_SocketHandle);


        OP_ROOM_CREATE_GET proto2 = new OP_ROOM_CREATE_GET();

        proto2.addSettingId(1001);
        proto2.addSettingId(1013);
        proto2.addSettingId(1018);
        proto2.clubId = 0;
        NetWorkSocket.Instance.Send(proto2.encode(), OP_ROOM_CREATE_GET.CODE, m_SocketHandle);
    }
Example #2
0
    /// <summary>
    /// 客户端发送握手消息
    /// </summary>
    private void ClientSendHandShake()
    {
        OP_PLAYER_CONNECT_GET proto = new OP_PLAYER_CONNECT_GET();

        proto.passportId = AccountProxy.Instance.CurrentAccountEntity.passportId;
        proto.token      = AccountProxy.Instance.CurrentAccountEntity.token;
        proto.latitude   = LPSManager.Instance.Latitude;
        proto.longitude  = LPSManager.Instance.Longitude;

        m_SendHandShakeClientTime = TimeUtil.GetTimestampMS();
        m_SocketClient.Send(proto.encode(), OP_PLAYER_CONNECT_GET.CODE);

        Debug.Log("客户端发送握手消息");
    }