Halyri - Udp-client
0.9.1
|
Class representing a ping packet for the protocol defined and implement by the UdpMediaClientSocket. This packet consist of a packet type identifier, sender GUID and a Int64 sequence number. More...
Inherits INetworkPacket.
Public Member Functions | |
PingPacket () | |
Initializes a new ping packet with no information. More... | |
PingPacket (string guid, Int64 sequenceNumber) | |
Initializes a new ping packet that has the provided sequence number and sender GUID. More... | |
PingPacket (string guid) | |
Initializes a new ping packet that has the provided sender GUID. More... | |
byte[] | GetBytes (long sequenceNumber) |
void | FromBytes (byte[] packetBytes) |
Sets the state of this packet from the provided array of bytes. If the array does not containt a valid byte representation of this type of packet, throws an ArgumentException. More... | |
byte[] | GetBytes () |
Converts this packet to a byte array for network transfer. The sequence number specified in the packet will be used. More... | |
Public Member Functions inherited from INetworkPacket | |
byte[] | GetBytes (Int64 sequence) |
Converts this packet to a byte array for network transfer. The specified seqeuence number will be used in the packet header. More... | |
Public Attributes | |
const int | HeaderLengthInOctets = 25 |
const byte | PacketId = 3 |
Properties | |
string | SourceGuid [get] |
String represenstation of the Guid identifying the sender More... | |
Int64 | Sequence [get, set] |
Packet sequence number More... | |
Class representing a ping packet for the protocol defined and implement by the UdpMediaClientSocket. This packet consist of a packet type identifier, sender GUID and a Int64 sequence number.
<author>Veli-Mikko Puupponen</author>
PingPacket | ( | ) |
Initializes a new ping packet with no information.
PingPacket | ( | string | guid, |
Int64 | sequenceNumber | ||
) |
Initializes a new ping packet that has the provided sequence number and sender GUID.
guid | Guid of the sender |
sequenceNumber | Packet sequence number |
PingPacket | ( | string | guid | ) |
Initializes a new ping packet that has the provided sender GUID.
guid | Guid of the sender |
void FromBytes | ( | byte[] | packetBytes | ) |
Sets the state of this packet from the provided array of bytes. If the array does not containt a valid byte representation of this type of packet, throws an ArgumentException.
Throws an ArgumentException if the provided array does not containt a valid byte repsentation of the packet type.
packetBytes | Byte representation of a packet with the same type as this packet |
Implements INetworkPacket.
byte [] GetBytes | ( | ) |
Converts this packet to a byte array for network transfer. The sequence number specified in the packet will be used.
Throws an ArgumentException if the packet is not in a properly initializes state.
Implements INetworkPacket.
|
getset |
Packet sequence number
|
get |
String represenstation of the Guid identifying the sender