public override void GetSystemTime(IRpcController controller, bnet.protocol.NoData request, Action <bnet.protocol.exchange.GetSystemTimeResponse> done) { var builder = bnet.protocol.exchange.GetSystemTimeResponse.CreateBuilder() .SetTime(DateTime.Now.ToExtendedEpoch()); done(builder.Build()); }
public static NoData Deserialize(Stream stream, NoData instance, long limit) { while (true) { if (limit < (long)0 || stream.Position < limit) { int num = stream.ReadByte(); if (num != -1) { Key key = ProtocolParser.ReadKey((byte)num, stream); if (key.Field == 0) { throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream"); } ProtocolParser.SkipKey(stream, key); } else { if (limit >= (long)0) { throw new EndOfStreamException(); } break; } } else { if (stream.Position != limit) { throw new ProtocolBufferException("Read past max limit"); } break; } } return(instance); }
public static void Serialize(Stream stream, NoData instance) { }
public void Serialize(Stream stream) { NoData.Serialize(stream, this); }
public static NoData Deserialize(Stream stream, NoData instance) { return(NoData.Deserialize(stream, instance, -1L)); }
public void Deserialize(Stream stream) { NoData.Deserialize(stream, this); }