Deserialize() public static method

public static Deserialize ( BinaryReader r ) : ServerOrder
r System.IO.BinaryReader
return ServerOrder
Beispiel #1
0
        void InterpretServerOrders(Connection conn, byte[] data)
        {
            var ms = new MemoryStream(data);
            var br = new BinaryReader(ms);

            try
            {
                while (ms.Position < ms.Length)
                {
                    var so = ServerOrder.Deserialize(br);
                    if (so == null)
                    {
                        return;
                    }
                    InterpretServerOrder(conn, so);
                }
            }
            catch (EndOfStreamException) { }
            catch (NotImplementedException) { }
        }