Show / Hide Table of Contents

Class StunMessage

Inheritance
Object
StunMessage
AllocateErrorResponse
AllocateRequest
AllocateSuccessResponse
BindingRequest
BindingSuccessResponse
ConnectionAttempt
ConnectionBindRequest
ConnectionBindSuccessResponse
ConnectRequest
ConnectSuccessResponse
CreatePermissionErrorResponse
CreatePermissionRequest
CreatePermissionSuccessResponse
RefreshErrorResponse
RefreshRequest
RefreshSuccessResponse
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Libplanet.Stun.Messages
Assembly: Libplanet.Stun.dll
Syntax
public abstract class StunMessage

Constructors

| Improve this Doc View Source

StunMessage()

Declaration
protected StunMessage()

Properties

| Improve this Doc View Source

Attributes

A list of Attribute of STUN packet.

Declaration
protected IEnumerable<Attribute> Attributes { get; set; }
Property Value
Type Description
IEnumerable<Attribute>
| Improve this Doc View Source

Class

A StunMessage.MessageClass of STUN packet.

Declaration
public abstract StunMessage.MessageClass Class { get; }
Property Value
Type Description
StunMessage.MessageClass
| Improve this Doc View Source

Method

A StunMessage.MessageMethod of STUN packet.

Declaration
public abstract StunMessage.MessageMethod Method { get; }
Property Value
Type Description
StunMessage.MessageMethod
| Improve this Doc View Source

TransactionId

A 96-bit length identifier, used to uniquely identify STUN transactions.

Declaration
public byte[] TransactionId { get; }
Property Value
Type Description
Byte[]

Methods

| Improve this Doc View Source

Encode(IStunContext)

Declaration
public byte[] Encode(IStunContext ctx)
Parameters
Type Name Description
IStunContext ctx
Returns
Type Description
Byte[]
| Improve this Doc View Source

GetAttribute<T>()

Declaration
protected T GetAttribute<T>()
    where T : Attribute
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

ParseAsync(Stream, CancellationToken)

Parses StunMessage from stream.

Declaration
public static async Task<StunMessage> ParseAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
Stream stream

A view of a sequence of STUN packet's bytes.

CancellationToken cancellationToken

A cancellation token used to propagate notification that this operation should be canceled.

Returns
Type Description
Task<StunMessage>

A StunMessage derived on bytes read from stream.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium