C# 클래스 Lidgren.Network.NetBuffer

파일 보기 프로젝트 열기: Fr0sZ/Skylines-Multiplayer 1 사용 예제들

공개 메소드들

메소드 설명
EnsureBufferSize ( int numberOfBits ) : void

Ensures the buffer can hold this number of bits

ReadAllFields ( object target ) : void

Reads all public and private declared instance fields of the object in alphabetical order using reflection

ReadAllFields ( object target, BindingFlags flags ) : void

Reads all fields with the specified binding of the object in alphabetical order using reflection

ReadAllProperties ( object target ) : void

Reads all public and private declared instance fields of the object in alphabetical order using reflection

ReadAllProperties ( object target, BindingFlags flags ) : void

Reads all fields with the specified binding of the object in alphabetical order using reflection

ReadBits ( byte into, int offset, int numberOfBits ) : void

Reads the specified number of bits into a preallocated array

ReadBoolean ( ) : bool

Reads a boolean value (stored as a single bit) written using Write(bool)

ReadByte ( byte &result ) : bool

Reads a byte and returns true or false for success

ReadByte ( ) : byte

Reads a byte

ReadByte ( int numberOfBits ) : byte

Reads 1 to 8 bits into a byte

ReadBytes ( int numberOfBytes, byte &result ) : bool

Reads the specified number of bytes and returns true for success

ReadBytes ( int numberOfBytes ) : byte[]

Reads the specified number of bytes

ReadBytes ( byte into, int offset, int numberOfBytes ) : void

Reads the specified number of bytes into a preallocated array

ReadDouble ( ) : double

Reads a 64 bit floating point value written using Write(Double)

ReadFloat ( ) : float

Reads a 32 bit floating point value written using Write(Single)

ReadIPEndPoint ( ) : IPEndPoint

Reads a stored IPv4 endpoint description

ReadInt16 ( ) : Int16

Reads a 16 bit signed integer written using Write(Int16)

ReadInt32 ( ) : Int32

Reads a 32 bit signed integer written using Write(Int32)

ReadInt32 ( int numberOfBits ) : Int32

Reads a signed integer stored in 1 to 32 bits, written using Write(Int32, Int32)

ReadInt64 ( ) : System.Int64

Reads a 64 bit signed integer written using Write(Int64)

ReadInt64 ( int numberOfBits ) : System.Int64

Reads a signed integer stored in 1 to 64 bits, written using Write(Int64, Int32)

ReadPadBits ( ) : void

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

ReadRangedInteger ( int min, int max ) : int

Reads a 32 bit integer value written using WriteRangedInteger()

ReadRangedSingle ( float min, float max, int numberOfBits ) : float

Reads a 32 bit floating point value written using WriteRangedSingle()

ReadSignedSingle ( int numberOfBits ) : float

Reads a 32 bit floating point value written using WriteSignedSingle()

ReadSingle ( float &result ) : bool

Reads a 32 bit floating point value written using Write(Single)

ReadSingle ( ) : float

Reads a 32 bit floating point value written using Write(Single)

ReadString ( string &result ) : bool

Reads a string written using Write(string) and returns true for success

ReadString ( ) : string

Reads a string written using Write(string)

ReadTime ( NetConnection connection, bool highPrecision ) : double

Reads a value, in local time comparable to NetTime.Now, written using WriteTime() for the connection supplied

ReadUnitSingle ( int numberOfBits ) : float

Reads a 32 bit floating point value written using WriteUnitSingle()

ReadVariableInt32 ( ) : int

Reads a variable sized Int32 written using WriteVariableInt32()

ReadVariableInt64 ( ) : System.Int64

Reads a variable sized Int64 written using WriteVariableInt64()

ReadVector3 ( ) : System.Vector3

SkipPadBits ( ) : void

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

SkipPadBits ( int numberOfBits ) : void

Pads data with the specified number of bits.

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 ( NetBuffer buffer ) : void

Append all the bits of message to this message

Write ( UInt32 source ) : void

Writes a 32 bit unsigned integer

Write ( System.Vector3 source ) : void

Writes a 32 bit floating point value

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 ( string source ) : void

Write a string

WriteAllFields ( object ob ) : void

Writes all public and private declared instance fields of the object in alphabetical order using reflection

WriteAllFields ( object ob, BindingFlags flags ) : void

Writes all fields with specified binding in alphabetical order using reflection

WriteAllProperties ( object ob ) : void

Writes all public and private declared instance properties of the object in alphabetical order using reflection

WriteAllProperties ( object ob, BindingFlags flags ) : void

Writes all properties with specified binding in alphabetical order using reflection

WriteAt ( Int32 offset, Int16 source ) : void

Writes a 16 bit signed integer at a given offset in the buffer

WriteAt ( Int32 offset, Int32 source ) : void

Writes a 32 bit signed integer at a given offset in the buffer

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 ( bool highPrecision ) : void

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

WriteTime ( double localTime, bool highPrecision ) : void

Writes a local timestamp 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

비공개 메소드들

메소드 설명
InternalEnsureBufferSize ( int numberOfBits ) : void

Ensures the buffer can hold this number of bits

ReadInt32 ( Int32 &result ) : bool
ReadSByte ( ) : sbyte
ReadUInt16 ( ) : UInt16
ReadUInt32 ( ) : UInt32
ReadUInt32 ( int numberOfBits ) : UInt32
ReadUInt32 ( UInt32 &result ) : bool
ReadUInt64 ( ) : System.UInt64
ReadUInt64 ( int numberOfBits ) : System.UInt64
ReadVariableUInt32 ( uint &result ) : bool
ReadVariableUInt32 ( ) : uint
ReadVariableUInt64 ( ) : System.UInt64
Write ( UInt16 source ) : void
Write ( UInt16 source, int numberOfBits ) : void
Write ( UInt32 source, int numberOfBits ) : void
Write ( System.UInt64 source ) : void
Write ( System.UInt64 source, int numberOfBits ) : void
Write ( sbyte source ) : void
WriteAt ( Int32 offset, UInt16 source ) : void
WriteAt ( Int32 offset, UInt32 source ) : void
WriteAt ( Int32 offset, System.UInt64 source ) : void
WriteVariableUInt32 ( uint value ) : int
WriteVariableUInt64 ( System.UInt64 value ) : int

메소드 상세

EnsureBufferSize() 공개 메소드

Ensures the buffer can hold this number of bits
public EnsureBufferSize ( int numberOfBits ) : void
numberOfBits int
리턴 void

ReadAllFields() 공개 메소드

Reads all public and private declared instance fields of the object in alphabetical order using reflection
public ReadAllFields ( object target ) : void
target object
리턴 void

ReadAllFields() 공개 메소드

Reads all fields with the specified binding of the object in alphabetical order using reflection
public ReadAllFields ( object target, BindingFlags flags ) : void
target object
flags BindingFlags
리턴 void

ReadAllProperties() 공개 메소드

Reads all public and private declared instance fields of the object in alphabetical order using reflection
public ReadAllProperties ( object target ) : void
target object
리턴 void

ReadAllProperties() 공개 메소드

Reads all fields with the specified binding of the object in alphabetical order using reflection
public ReadAllProperties ( object target, BindingFlags flags ) : void
target object
flags BindingFlags
리턴 void

ReadBits() 공개 메소드

Reads the specified number of bits into a preallocated array
public ReadBits ( byte into, int offset, int numberOfBits ) : void
into byte The destination array
offset int The offset where to start writing in the destination array
numberOfBits int The number of bits to read
리턴 void

ReadBoolean() 공개 메소드

Reads a boolean value (stored as a single bit) written using Write(bool)
public ReadBoolean ( ) : bool
리턴 bool

ReadByte() 공개 메소드

Reads a byte and returns true or false for success
public ReadByte ( byte &result ) : bool
result byte
리턴 bool

ReadByte() 공개 메소드

Reads a byte
public ReadByte ( ) : byte
리턴 byte

ReadByte() 공개 메소드

Reads 1 to 8 bits into a byte
public ReadByte ( int numberOfBits ) : byte
numberOfBits int
리턴 byte

ReadBytes() 공개 메소드

Reads the specified number of bytes and returns true for success
public ReadBytes ( int numberOfBytes, byte &result ) : bool
numberOfBytes int
result byte
리턴 bool

ReadBytes() 공개 메소드

Reads the specified number of bytes
public ReadBytes ( int numberOfBytes ) : byte[]
numberOfBytes int
리턴 byte[]

ReadBytes() 공개 메소드

Reads the specified number of bytes into a preallocated array
public ReadBytes ( byte into, int offset, int numberOfBytes ) : void
into byte The destination array
offset int The offset where to start writing in the destination array
numberOfBytes int The number of bytes to read
리턴 void

ReadDouble() 공개 메소드

Reads a 64 bit floating point value written using Write(Double)
public ReadDouble ( ) : double
리턴 double

ReadFloat() 공개 메소드

Reads a 32 bit floating point value written using Write(Single)
public ReadFloat ( ) : float
리턴 float

ReadIPEndPoint() 공개 메소드

Reads a stored IPv4 endpoint description
public ReadIPEndPoint ( ) : IPEndPoint
리턴 System.Net.IPEndPoint

ReadInt16() 공개 메소드

Reads a 16 bit signed integer written using Write(Int16)
public ReadInt16 ( ) : Int16
리턴 System.Int16

ReadInt32() 공개 메소드

Reads a 32 bit signed integer written using Write(Int32)
public ReadInt32 ( ) : Int32
리턴 System.Int32

ReadInt32() 공개 메소드

Reads a signed integer stored in 1 to 32 bits, written using Write(Int32, Int32)
public ReadInt32 ( int numberOfBits ) : Int32
numberOfBits int
리턴 System.Int32

ReadInt64() 공개 메소드

Reads a 64 bit signed integer written using Write(Int64)
public ReadInt64 ( ) : System.Int64
리턴 System.Int64

ReadInt64() 공개 메소드

Reads a signed integer stored in 1 to 64 bits, written using Write(Int64, Int32)
public ReadInt64 ( int numberOfBits ) : System.Int64
numberOfBits int
리턴 System.Int64

ReadPadBits() 공개 메소드

Pads data with enough bits to reach a full byte. Decreases cpu usage for subsequent byte writes.
public ReadPadBits ( ) : void
리턴 void

ReadRangedInteger() 공개 메소드

Reads a 32 bit integer value written using WriteRangedInteger()
public ReadRangedInteger ( int min, int max ) : int
min int The minimum value used when writing the value
max int The maximum value used when writing the value
리턴 int

ReadRangedSingle() 공개 메소드

Reads a 32 bit floating point value written using WriteRangedSingle()
public ReadRangedSingle ( float min, float max, int numberOfBits ) : float
min float The minimum value used when writing the value
max float The maximum value used when writing the value
numberOfBits int The number of bits used when writing the value
리턴 float

ReadSignedSingle() 공개 메소드

Reads a 32 bit floating point value written using WriteSignedSingle()
public ReadSignedSingle ( int numberOfBits ) : float
numberOfBits int The number of bits used when writing the value
리턴 float

ReadSingle() 공개 메소드

Reads a 32 bit floating point value written using Write(Single)
public ReadSingle ( float &result ) : bool
result float
리턴 bool

ReadSingle() 공개 메소드

Reads a 32 bit floating point value written using Write(Single)
public ReadSingle ( ) : float
리턴 float

ReadString() 공개 메소드

Reads a string written using Write(string) and returns true for success
public ReadString ( string &result ) : bool
result string
리턴 bool

ReadString() 공개 메소드

Reads a string written using Write(string)
public ReadString ( ) : string
리턴 string

ReadTime() 공개 메소드

Reads a value, in local time comparable to NetTime.Now, written using WriteTime() for the connection supplied
public ReadTime ( NetConnection connection, bool highPrecision ) : double
connection NetConnection
highPrecision bool
리턴 double

ReadUnitSingle() 공개 메소드

Reads a 32 bit floating point value written using WriteUnitSingle()
public ReadUnitSingle ( int numberOfBits ) : float
numberOfBits int The number of bits used when writing the value
리턴 float

ReadVariableInt32() 공개 메소드

Reads a variable sized Int32 written using WriteVariableInt32()
public ReadVariableInt32 ( ) : int
리턴 int

ReadVariableInt64() 공개 메소드

Reads a variable sized Int64 written using WriteVariableInt64()
public ReadVariableInt64 ( ) : System.Int64
리턴 System.Int64

ReadVector3() 공개 메소드

public ReadVector3 ( ) : System.Vector3
리턴 System.Vector3

SkipPadBits() 공개 메소드

Pads data with enough bits to reach a full byte. Decreases cpu usage for subsequent byte writes.
public SkipPadBits ( ) : void
리턴 void

SkipPadBits() 공개 메소드

Pads data with the specified number of bits.
public SkipPadBits ( int numberOfBits ) : void
numberOfBits int
리턴 void

Write() 공개 메소드

Writes an endpoint description
public Write ( IPEndPoint endPoint ) : void
endPoint System.Net.IPEndPoint
리턴 void

Write() 공개 메소드

Writes a signed 16 bit integer
public Write ( Int16 source ) : void
source System.Int16
리턴 void

Write() 공개 메소드

Writes a 32 bit signed integer
public Write ( Int32 source ) : void
source System.Int32
리턴 void

Write() 공개 메소드

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

Write() 공개 메소드

Writes a 64 bit signed integer
public Write ( System.Int64 source ) : void
source System.Int64
리턴 void

Write() 공개 메소드

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

Write() 공개 메소드

Append all the bits of message to this message
public Write ( NetBuffer buffer ) : void
buffer NetBuffer
리턴 void

Write() 공개 메소드

Writes a 32 bit unsigned integer
public Write ( UInt32 source ) : void
source System.UInt32
리턴 void

Write() 공개 메소드

Writes a 32 bit floating point value
public Write ( System.Vector3 source ) : void
source System.Vector3
리턴 void

Write() 공개 메소드

Writes a boolean value using 1 bit
public Write ( bool value ) : void
value bool
리턴 void

Write() 공개 메소드

Write a byte
public Write ( byte source ) : void
source byte
리턴 void

Write() 공개 메소드

Writes 1 to 8 bits of a byte
public Write ( byte source, int numberOfBits ) : void
source byte
numberOfBits int
리턴 void

Write() 공개 메소드

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

Write() 공개 메소드

Writes a 64 bit floating point value
public Write ( double source ) : void
source double
리턴 void

Write() 공개 메소드

Writes a 32 bit floating point value
public Write ( float source ) : void
source float
리턴 void

Write() 공개 메소드

Write a string
public Write ( string source ) : void
source string
리턴 void

WriteAllFields() 공개 메소드

Writes all public and private declared instance fields of the object in alphabetical order using reflection
public WriteAllFields ( object ob ) : void
ob object
리턴 void

WriteAllFields() 공개 메소드

Writes all fields with specified binding in alphabetical order using reflection
public WriteAllFields ( object ob, BindingFlags flags ) : void
ob object
flags BindingFlags
리턴 void

WriteAllProperties() 공개 메소드

Writes all public and private declared instance properties of the object in alphabetical order using reflection
public WriteAllProperties ( object ob ) : void
ob object
리턴 void

WriteAllProperties() 공개 메소드

Writes all properties with specified binding in alphabetical order using reflection
public WriteAllProperties ( object ob, BindingFlags flags ) : void
ob object
flags BindingFlags
리턴 void

WriteAt() 공개 메소드

Writes a 16 bit signed integer at a given offset in the buffer
public WriteAt ( Int32 offset, Int16 source ) : void
offset System.Int32
source System.Int16
리턴 void

WriteAt() 공개 메소드

Writes a 32 bit signed integer at a given offset in the buffer
public WriteAt ( Int32 offset, Int32 source ) : void
offset System.Int32
source System.Int32
리턴 void

WritePadBits() 공개 메소드

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

WritePadBits() 공개 메소드

Pads data with the specified number of bits.
public WritePadBits ( int numberOfBits ) : void
numberOfBits int
리턴 void

WriteRangedInteger() 공개 메소드

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
리턴 int

WriteRangedSingle() 공개 메소드

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
리턴 void

WriteSignedSingle() 공개 메소드

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

WriteTime() 공개 메소드

Writes the current local time to a message; readable (and convertable to local time) by the remote host using ReadTime()
public WriteTime ( bool highPrecision ) : void
highPrecision bool
리턴 void

WriteTime() 공개 메소드

Writes a local timestamp 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
리턴 void

WriteUnitSingle() 공개 메소드

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

WriteVariableInt32() 공개 메소드

Write Base128 encoded variable sized signed integer of up to 32 bits
public WriteVariableInt32 ( int value ) : int
value int
리턴 int

WriteVariableInt64() 공개 메소드

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