Example #1
0
    public void OnlinePlayers()
    {
        GameProto.PlayerRequestLoginOnLinePlayer oTeam = new GameProto.PlayerRequestLoginOnLinePlayer();
        byte[]          pData   = new byte[1024];
        FxNet.NetStream pStream = new FxNet.NetStream(FxNet.NetStream.ENetStreamType.ENetStreamType_Write, pData, 1024);
        pStream.WriteString("GameProto.PlayerRequestLoginOnLinePlayer");
        byte[] pProto = new byte[oTeam.CalculateSize()];
        Google.Protobuf.CodedOutputStream oStream = new Google.Protobuf.CodedOutputStream(pProto);
        oTeam.WriteTo(oStream);
        pStream.WriteData(pProto, (uint)pProto.Length);

        m_pSession.Send(pData, 1024 - pStream.GetLeftLen());
    }
Example #2
0
 public void OnlinePlayers()
 {
     GameProto.PlayerRequestLoginOnLinePlayer oTeam = new GameProto.PlayerRequestLoginOnLinePlayer();
     SysUtil.SendMessage(m_pSession, oTeam, "GameProto.PlayerRequestLoginOnLinePlayer");
 }