public SetPayload ( byte payload ) : void | ||
payload | byte | The payload. |
Результат | void |
public void SetPayload( byte[] payload )
{
this.Clear();
this.Write( payload );
}
/// <summary> /// Attempts to receive a tcp packet from the socket. /// </summary> /// <returns>The packet.</returns> public TcpPacket ReceivePacket() { TcpPacket pack = new TcpPacket(); uint size = NetHelpers.EndianSwap(this.Reader.ReadUInt32()); byte[] payload = Reader.ReadBytes(( int )size); pack.SetPayload(payload); return(pack); }