C# Class Lidgren.Network.NetOutgoingMessage

Inheritance: SlimNet.Network.IRawStream
Afficher le fichier Open project: tomoprime/CrabBattle Class Usage Examples

Méthodes publiques

Méthode Description
EnsureBufferSize ( int numberOfBits ) : void

Ensures the buffer can hold this number of bits

InternalEnsureBufferSize ( int numberOfBits ) : void

Ensures the buffer can hold this number of bits

PeekDataBuffer ( ) : byte[]

Returns the internal data buffer, don't modify

Write ( IPEndPoint endPoint ) : void

Writes an endpoint description

Write ( Int16 source ) : void

Writes a signed 16 bit integer

Write ( Int32 source ) : void

Writes a 32 bit signed integer

Write ( Int32 source, int numberOfBits ) : void

Writes a signed integer using 1 to 32 bits

Write ( System.Int64 source ) : void

Writes a 64 bit signed integer

Write ( System.Int64 source, int numberOfBits ) : void

Writes a signed integer using 1 to 64 bits

Write ( NetIncomingMessage message ) : void

Append all the bits of message to this message

Write ( NetOutgoingMessage message ) : void

Append all the bits of message to this message

Write ( UInt16 source ) : void

Writes an unsigned 16 bit integer

Write ( UInt16 source, int numberOfBits ) : void

Writes an unsigned integer using 1 to 16 bits

Write ( UInt32 source ) : void

Writes a 32 bit unsigned integer

Write ( UInt32 source, int numberOfBits ) : void

Writes a 32 bit signed integer

Write ( System.UInt64 source ) : void

Writes a 64 bit unsigned integer

Write ( System.UInt64 source, int numberOfBits ) : void

Writes an unsigned integer using 1 to 64 bits

Write ( bool value ) : void

Writes a boolean value using 1 bit

Write ( byte source ) : void

Write a byte

Write ( byte source, int numberOfBits ) : void

Writes 1 to 8 bits of a byte

Write ( byte source, int offsetInBytes, int numberOfBytes ) : void

Writes the specified number of bytes from an array

Write ( double source ) : void

Writes a 64 bit floating point value

Write ( float source ) : void

Writes a 32 bit floating point value

Write ( sbyte source ) : void

Writes a signed byte

Write ( string source ) : void

Write a string

WritePadBits ( ) : void

Pads data with enough bits to reach a full byte. Decreases cpu usage for subsequent byte writes.

WritePadBits ( int numberOfBits ) : void

Pads data with the specified number of bits.

WriteRangedInteger ( int min, int max, int value ) : int

Writes an integer with the least amount of bits need for the specified range Returns number of bits written

WriteRangedSingle ( float value, float min, float max, int numberOfBits ) : void

Compress a float within a specified range using a certain number of bits

WriteSignedSingle ( float value, int numberOfBits ) : void

Compress (lossy) a float in the range -1..1 using numberOfBits bits

WriteTime ( double localTime, bool highPrecision ) : void

Writes the local time to a message; readable (and convertable to local time) by the remote host using ReadTime()

WriteUnitSingle ( float value, int numberOfBits ) : void

Compress (lossy) a float in the range 0..1 using numberOfBits bits

WriteVariableInt32 ( int value ) : int

Write Base128 encoded variable sized signed integer of up to 32 bits

WriteVariableInt64 ( System.Int64 value ) : int

Write Base128 encoded variable sized signed integer of up to 64 bits

WriteVariableUInt32 ( uint value ) : int

Write Base128 encoded variable sized unsigned integer of up to 32 bits

WriteVariableUInt64 ( System.UInt64 value ) : int

Write Base128 encoded variable sized unsigned integer of up to 64 bits

Private Methods

Méthode Description
NetOutgoingMessage ( ) : System

Method Details

EnsureBufferSize() public méthode

Ensures the buffer can hold this number of bits
public EnsureBufferSize ( int numberOfBits ) : void
numberOfBits int
Résultat void

InternalEnsureBufferSize() public méthode

Ensures the buffer can hold this number of bits
public InternalEnsureBufferSize ( int numberOfBits ) : void
numberOfBits int
Résultat void

PeekDataBuffer() public méthode

Returns the internal data buffer, don't modify
public PeekDataBuffer ( ) : byte[]
Résultat byte[]

Write() public méthode

Writes an endpoint description
public Write ( IPEndPoint endPoint ) : void
endPoint System.Net.IPEndPoint
Résultat void

Write() public méthode

Writes a signed 16 bit integer
public Write ( Int16 source ) : void
source System.Int16
Résultat void

Write() public méthode

Writes a 32 bit signed integer
public Write ( Int32 source ) : void
source System.Int32
Résultat void

Write() public méthode

Writes a signed integer using 1 to 32 bits
public Write ( Int32 source, int numberOfBits ) : void
source System.Int32
numberOfBits int
Résultat void

Write() public méthode

Writes a 64 bit signed integer
public Write ( System.Int64 source ) : void
source System.Int64
Résultat void

Write() public méthode

Writes a signed integer using 1 to 64 bits
public Write ( System.Int64 source, int numberOfBits ) : void
source System.Int64
numberOfBits int
Résultat void

Write() public méthode

Append all the bits of message to this message
public Write ( NetIncomingMessage message ) : void
message NetIncomingMessage
Résultat void

Write() public méthode

Append all the bits of message to this message
public Write ( NetOutgoingMessage message ) : void
message NetOutgoingMessage
Résultat void

Write() public méthode

Writes an unsigned 16 bit integer
public Write ( UInt16 source ) : void
source System.UInt16
Résultat void

Write() public méthode

Writes an unsigned integer using 1 to 16 bits
public Write ( UInt16 source, int numberOfBits ) : void
source System.UInt16
numberOfBits int
Résultat void

Write() public méthode

Writes a 32 bit unsigned integer
public Write ( UInt32 source ) : void
source System.UInt32
Résultat void

Write() public méthode

Writes a 32 bit signed integer
public Write ( UInt32 source, int numberOfBits ) : void
source System.UInt32
numberOfBits int
Résultat void

Write() public méthode

Writes a 64 bit unsigned integer
public Write ( System.UInt64 source ) : void
source System.UInt64
Résultat void

Write() public méthode

Writes an unsigned integer using 1 to 64 bits
public Write ( System.UInt64 source, int numberOfBits ) : void
source System.UInt64
numberOfBits int
Résultat void

Write() public méthode

Writes a boolean value using 1 bit
public Write ( bool value ) : void
value bool
Résultat void

Write() public méthode

Write a byte
public Write ( byte source ) : void
source byte
Résultat void

Write() public méthode

Writes 1 to 8 bits of a byte
public Write ( byte source, int numberOfBits ) : void
source byte
numberOfBits int
Résultat void

Write() public méthode

Writes the specified number of bytes from an array
public Write ( byte source, int offsetInBytes, int numberOfBytes ) : void
source byte
offsetInBytes int
numberOfBytes int
Résultat void

Write() public méthode

Writes a 64 bit floating point value
public Write ( double source ) : void
source double
Résultat void

Write() public méthode

Writes a 32 bit floating point value
public Write ( float source ) : void
source float
Résultat void

Write() public méthode

Writes a signed byte
public Write ( sbyte source ) : void
source sbyte
Résultat void

Write() public méthode

Write a string
public Write ( string source ) : void
source string
Résultat void

WritePadBits() public méthode

Pads data with enough bits to reach a full byte. Decreases cpu usage for subsequent byte writes.
public WritePadBits ( ) : void
Résultat void

WritePadBits() public méthode

Pads data with the specified number of bits.
public WritePadBits ( int numberOfBits ) : void
numberOfBits int
Résultat void

WriteRangedInteger() public méthode

Writes an integer with the least amount of bits need for the specified range Returns number of bits written
public WriteRangedInteger ( int min, int max, int value ) : int
min int
max int
value int
Résultat int

WriteRangedSingle() public méthode

Compress a float within a specified range using a certain number of bits
public WriteRangedSingle ( float value, float min, float max, int numberOfBits ) : void
value float
min float
max float
numberOfBits int
Résultat void

WriteSignedSingle() public méthode

Compress (lossy) a float in the range -1..1 using numberOfBits bits
public WriteSignedSingle ( float value, int numberOfBits ) : void
value float
numberOfBits int
Résultat void

WriteTime() public méthode

Writes the local time to a message; readable (and convertable to local time) by the remote host using ReadTime()
public WriteTime ( double localTime, bool highPrecision ) : void
localTime double
highPrecision bool
Résultat void

WriteUnitSingle() public méthode

Compress (lossy) a float in the range 0..1 using numberOfBits bits
public WriteUnitSingle ( float value, int numberOfBits ) : void
value float
numberOfBits int
Résultat void

WriteVariableInt32() public méthode

Write Base128 encoded variable sized signed integer of up to 32 bits
public WriteVariableInt32 ( int value ) : int
value int
Résultat int

WriteVariableInt64() public méthode

Write Base128 encoded variable sized signed integer of up to 64 bits
public WriteVariableInt64 ( System.Int64 value ) : int
value System.Int64
Résultat int

WriteVariableUInt32() public méthode

Write Base128 encoded variable sized unsigned integer of up to 32 bits
public WriteVariableUInt32 ( uint value ) : int
value uint
Résultat int

WriteVariableUInt64() public méthode

Write Base128 encoded variable sized unsigned integer of up to 64 bits
public WriteVariableUInt64 ( System.UInt64 value ) : int
value System.UInt64
Résultat int