コード例 #1
0
ファイル: UdpPacket.cs プロジェクト: stil/SteamKit
        /// <summary>
        /// Initializes a new instance of the <see cref="UdpPacket"/> class, with
        /// no payload.
        /// 
        /// Header must be populated manually.
        /// </summary>
        /// <param name="type">The type.</param>
        public UdpPacket(EUdpPacketType type)
        {
            this.Header = new UdpHeader();
            this.Payload = new MemoryStream();

            this.Header.PacketType = type;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UdpPacket"/> class, with
        /// no payload.
        ///
        /// Header must be populated manually.
        /// </summary>
        /// <param name="type">The type.</param>
        public UdpPacket(EUdpPacketType type)
        {
            this.Header  = new UdpHeader();
            this.Payload = new MemoryStream();

            this.Header.PacketType = type;
        }
コード例 #3
0
ファイル: UdpPacket.cs プロジェクト: stil/SteamKit
 /// <summary>
 /// Initializes a new instance of the <see cref="UdpPacket"/> class, of the
 /// specified type containing the first 'length' bytes of specified payload.
 /// 
 /// Header must be populated manually.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="payload">The payload.</param>
 /// <param name="length">The length.</param>
 public UdpPacket(EUdpPacketType type, MemoryStream payload, long length)
     : this(type)
 {
     SetPayload(payload, length);
 }
コード例 #4
0
ファイル: UdpPacket.cs プロジェクト: stil/SteamKit
 /// <summary>
 /// Initializes a new instance of the <see cref="UdpPacket"/> class, of the
 /// specified type containing the specified payload.
 /// 
 /// Header must be populated manually.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="payload">The payload.</param>
 public UdpPacket(EUdpPacketType type, MemoryStream payload)
     : this(type)
 {
     SetPayload(payload);
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UdpPacket"/> class, of the
 /// specified type containing the specified payload.
 ///
 /// Header must be populated manually.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="payload">The payload.</param>
 public UdpPacket(EUdpPacketType type, MemoryStream payload)
     : this(type)
 {
     SetPayload(payload);
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UdpPacket"/> class, of the
 /// specified type containing the first 'length' bytes of specified payload.
 ///
 /// Header must be populated manually.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="payload">The payload.</param>
 /// <param name="length">The length.</param>
 public UdpPacket(EUdpPacketType type, MemoryStream payload, long length)
     : this(type)
 {
     SetPayload(payload, length);
 }