C# Class NetworkPackets.UdpPacket

Provides an encapsulation for Udp Packets and can create new Udp Packets.
The contents of a Udp Packet: Field Position Source Port2 bytes Destination Port2 bytes Length2 bytes - includes udp header and data Checksum2 bytes- disabled = 00 00 00 00 DataThe rest
Inheritance: NetworkPacket
Mostrar archivo Open project: pstjuste/brunet Class Usage Examples

Public Properties

Property Type Description
DestinationPort int
SourcePort int

Public Methods

Method Description
UdpPacket ( MemBlock packet ) : Brunet

Takes in a MemBlock and parses it as a Udp Packet.

UdpPacket ( int SourcePort, int DestinationPort, ICopyable Payload ) : Brunet

Creates a Udp Packet given the source port, destination port and the payload.

Method Details

UdpPacket() public method

Takes in a MemBlock and parses it as a Udp Packet.
public UdpPacket ( MemBlock packet ) : Brunet
packet MemBlock The MemBlock containing the Udp Packet
return Brunet

UdpPacket() public method

Creates a Udp Packet given the source port, destination port and the payload.
public UdpPacket ( int SourcePort, int DestinationPort, ICopyable Payload ) : Brunet
SourcePort int The packets originating port
DestinationPort int The packets destination port
Payload ICopyable The data for the packet.
return Brunet

Property Details

DestinationPort public_oe property

The packets destination port
public int DestinationPort
return int

SourcePort public_oe property

The packets originating port
public int SourcePort
return int