SteamKit2.Internal.MsgGCHdrProtoBuf.Serialize C# (CSharp) Method

Serialize() public method

public Serialize ( Stream stream ) : void
stream Stream
return void
		public void Serialize(Stream stream)
		{
			MemoryStream msProto = new MemoryStream();
			ProtoBuf.Serializer.Serialize<SteamKit2.GC.Internal.CMsgProtoBufHeader>(msProto, Proto);
			HeaderLength = (int)msProto.Length;
			BinaryWriter bw = new BinaryWriter( stream );

			bw.Write( MsgUtil.MakeGCMsg( Msg, true ) );
			bw.Write( HeaderLength );
			bw.Write( msProto.ToArray() );

			msProto.Close();
		}