ReadRemaining() public method

public ReadRemaining ( ) : byte[]
return byte[]
コード例 #1
0
    void OnReceivedInternal(MemoryStream ms)
    {
        BinaryReader br = new BinaryReader(ms);

        byte[] message = br.ReadBytes((int)(ms.Length - ms.Position));
        br.Close();
        ms.Close();
        ms.Dispose();

        NetBuffer temp = new NetBuffer(message);
        ushort    cmd  = temp.ReadShort();

        byte[] buf = temp.ReadRemaining();
        SocketClientManager.AddEvent(cmd.ToString(), new NetBuffer(buf));
    }
コード例 #2
0
ファイル: SocketClient.cs プロジェクト: meta-42/uEasyKit
    void OnReceivedInternal(MemoryStream ms)
    {
        BinaryReader br = new BinaryReader(ms);
        byte[] message = br.ReadBytes((int)(ms.Length - ms.Position));
        br.Close();
        ms.Close();
        ms.Dispose();

        NetBuffer temp = new NetBuffer(message);
        ushort cmd = temp.ReadShort();
        byte[] buf = temp.ReadRemaining();
        SocketClientManager.AddEvent(cmd.ToString(), new NetBuffer(buf));
    }