Show / Hide Table of Contents

Class NatWriter

Writes NAT data items to stream.

Inheritance
Object
NatWriter
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Makaretu.Nat
Assembly: Makaretu.Nat.dll
Syntax
public class NatWriter
Remarks

NatWriter is used to write data items to a NAT-PCP or NAT-PMP stream.

Constructors

| Improve this Doc View Source

NatWriter(Stream)

Creates a new instance of the NatWriter on the specified Stream.

Declaration
public NatWriter(Stream stream)
Parameters
Type Name Description
Stream stream

The destination for data items.

Fields

| Improve this Doc View Source

Position

The writer relative position within the stream.

Declaration
public int Position
Field Value
Type Description
Int32

Methods

| Improve this Doc View Source

WriteByte(Byte)

Write a byte.

Declaration
public void WriteByte(byte value)
Parameters
Type Name Description
Byte value
| Improve this Doc View Source

WriteBytes(Byte[])

Write a sequence of bytes.

Declaration
public void WriteBytes(byte[] bytes)
Parameters
Type Name Description
Byte[] bytes
| Improve this Doc View Source

WriteIPv4Address(IPAddress)

Write an IPv4 address.

Declaration
public void WriteIPv4Address(IPAddress value)
Parameters
Type Name Description
IPAddress value
| Improve this Doc View Source

WriteIPv6Address(IPAddress)

Write an IPv6 address.

Declaration
public void WriteIPv6Address(IPAddress value)
Parameters
Type Name Description
IPAddress value
| Improve this Doc View Source

WriteTimeSpan(TimeSpan)

Write a time span.

Declaration
public void WriteTimeSpan(TimeSpan value)
Parameters
Type Name Description
TimeSpan value
Remarks

Represented as 32-bit unsigned int (in seconds).

| Improve this Doc View Source

WriteUInt16(UInt16)

Write an unsigned short.

Declaration
public void WriteUInt16(ushort value)
Parameters
Type Name Description
UInt16 value
| Improve this Doc View Source

WriteUInt32(UInt32)

Write an unsigned int.

Declaration
public void WriteUInt32(uint value)
Parameters
Type Name Description
UInt32 value
  • Improve this Doc
  • View Source
Back to top Generated by DocFX