C# Class NetworkPackets.StunPacket

Parses and creates Stun packets as defined by RFC 5389.
Show file Open project: pstjuste/brunet Class Usage Examples

Public Properties

Property Type Description
Attributes List
Class ClassType
Data Brunet.Util.MemBlock
EMPTY_ATTRIBUTES List
MAGIC_COOKIE byte[]
Message MessageType
TransactionID Brunet.Util.MemBlock

Public Methods

Method Description
StunPacket ( ClassType ct, MessageType mt, List attributes ) : Brunet.Util

Generate an Stun packet.

StunPacket ( MemBlock packet ) : Brunet.Util

Parse a Stun packet.

Method Details

StunPacket() public method

Generate an Stun packet.
public StunPacket ( ClassType ct, MessageType mt, List attributes ) : Brunet.Util
ct ClassType
mt MessageType
attributes List
return Brunet.Util

StunPacket() public method

Parse a Stun packet.
public StunPacket ( MemBlock packet ) : Brunet.Util
packet Brunet.Util.MemBlock
return Brunet.Util

Property Details

Attributes public property

List of attributes in this packet.
public List Attributes
return List

Class public property

The class type for this packet.
public ClassType Class
return ClassType

Data public property

The whole packet.
public MemBlock,Brunet.Util Data
return Brunet.Util.MemBlock

EMPTY_ATTRIBUTES public static property

public static List EMPTY_ATTRIBUTES
return List

MAGIC_COOKIE public static property

public static byte[] MAGIC_COOKIE
return byte[]

Message public property

The message type for this packet.
public MessageType Message
return MessageType

TransactionID public property

Transaction ID that uniquely identifies this packet.
public MemBlock,Brunet.Util TransactionID
return Brunet.Util.MemBlock