C# Class OpenStory.Common.IO.PacketBuilder

Represents a class for constructing game packets.
This class exclusively uses little-endian byte order.
Inheritance: IPacketBuilder, IDisposable
Afficher le fichier Open project: shoftee/OpenStory Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void Calling instance methods after calling this will cause them to throw an ObjectDisposedException.
PacketBuilder ( ) : System

Initializes a new instance of the PacketBuilder class with the default capacity.

ToByteArray ( ) : byte[]

Gets a copy of the internal byte buffer of the PacketBuilder.

WriteBoolean ( bool boolean ) : void
WriteByte ( byte number ) : void
WriteByte ( int number ) : void
WriteBytes ( byte bytes ) : void
WriteInt16 ( int number ) : void
WriteInt16 ( short number ) : void
WriteInt16 ( uint number ) : void
WriteInt16 ( ushort number ) : void
WriteInt32 ( int number ) : void
WriteInt32 ( uint number ) : void
WriteInt64 ( long number ) : void
WriteInt64 ( ulong number ) : void
WriteLengthString ( string @string ) : void
WritePaddedString ( string @string, int paddingLength ) : void
WriteZeroes ( int count ) : void

Private Methods

Méthode Description
ThrowIfDisposed ( ) : void

Throws a new ObjectDisposedException if the current object is disposed.

WriteDirect ( byte bytes ) : void

Method Details

Dispose() public méthode

Calling instance methods after calling this will cause them to throw an ObjectDisposedException.
public Dispose ( ) : void
Résultat void

PacketBuilder() public méthode

Initializes a new instance of the PacketBuilder class with the default capacity.
public PacketBuilder ( ) : System
Résultat System

ToByteArray() public méthode

Gets a copy of the internal byte buffer of the PacketBuilder.
public ToByteArray ( ) : byte[]
Résultat byte[]

WriteBoolean() public méthode

public WriteBoolean ( bool boolean ) : void
boolean bool
Résultat void

WriteByte() public méthode

public WriteByte ( byte number ) : void
number byte
Résultat void

WriteByte() public méthode

public WriteByte ( int number ) : void
number int
Résultat void

WriteBytes() public méthode

public WriteBytes ( byte bytes ) : void
bytes byte
Résultat void

WriteInt16() public méthode

public WriteInt16 ( int number ) : void
number int
Résultat void

WriteInt16() public méthode

public WriteInt16 ( short number ) : void
number short
Résultat void

WriteInt16() public méthode

public WriteInt16 ( uint number ) : void
number uint
Résultat void

WriteInt16() public méthode

public WriteInt16 ( ushort number ) : void
number ushort
Résultat void

WriteInt32() public méthode

public WriteInt32 ( int number ) : void
number int
Résultat void

WriteInt32() public méthode

public WriteInt32 ( uint number ) : void
number uint
Résultat void

WriteInt64() public méthode

public WriteInt64 ( long number ) : void
number long
Résultat void

WriteInt64() public méthode

public WriteInt64 ( ulong number ) : void
number ulong
Résultat void

WriteLengthString() public méthode

public WriteLengthString ( string @string ) : void
@string string
Résultat void

WritePaddedString() public méthode

public WritePaddedString ( string @string, int paddingLength ) : void
@string string
paddingLength int
Résultat void

WriteZeroes() public méthode

public WriteZeroes ( int count ) : void
count int
Résultat void