Beispiel #1
0
    void Msg_login_PeerConnected(NetworkPeer peer, gamedef.PeerConnected msg)
    {
        var req = new gamedef.LoginREQ();

        req.ClientVersion = Constant.ClientVersion;
        req.PlatformToken = Account;
        _loginPeer.SendMessage(req);
    }
Beispiel #2
0
    public void Login( )
    {
        _loginPeer.Connect(Address);

        _loginPeer.RegisterMessage <gamedef.PeerConnected>(obj =>
        {
            var req           = new gamedef.LoginREQ();
            req.ClientVersion = Constant.ClientVersion;
            req.PlatformToken = Account;
            _loginPeer.SendMessage(req);
        });

        _loginPeer.RegisterMessage <gamedef.LoginACK>(obj =>
        {
            var msg = obj as gamedef.LoginACK;

            _serverList = msg.ServerList;

            OnLoginOK();
        });
    }