SteamKit2.TcpPacket.GetPayload C# (CSharp) Method

GetPayload() public method

Gets the payload of this packet.
public GetPayload ( ) : byte[]
return byte[]
        public byte[] GetPayload()
        {
            return this.ToArray();
        }

Usage Example

Example #1
0
        /// <summary>
        /// Requests the client config record from the server.
        /// </summary>
        /// <returns>A binary blob that represents the config record on success; otherwise <c>null</c>.</returns>
        public byte[] GetClientConfigRecord()
        {
            if (!this.HandshakeServer(ESteam2ServerType.ConfigServer))
            {
                this.Disconnect();
                return(null);
            }

            uint externalIp = Socket.Reader.ReadUInt32();

            if (!this.SendCommand(1))     // command: Get CCR
            {
                return(null);
            }

            TcpPacket pack = Socket.ReceivePacket();

            this.Disconnect();

            if (pack == null)
            {
                return(null);
            }

            return(pack.GetPayload());
        }
All Usage Examples Of SteamKit2.TcpPacket::GetPayload