Photon .NET Client API 4.1.4.8

Public Member Functions | Properties | List of all members
ExitGames.Client.Photon.StreamBuffer Class Reference

Public Member Functions

 StreamBuffer (int size=DefaultInitialSize)
 
 StreamBuffer (byte[] buf)
 
byte[] ToArray ()
 Allocates a new byte[] that is the exact used length. Use GetBuffer for nonalloc operations. More...
 
byte[] ToArrayFromPos ()
 Allocates a new byte[] that is the exact used length. Use GetBuffer for nonalloc operations. More...
 
void Compact ()
 The bytes between Position and Length are copied to the beginning of the buffer. Length decreased by Position. Position set to 0. More...
 
byte[] GetBuffer ()
 
byte[] GetBufferAndAdvance (int length, out int offset)
 Brings StreamBuffer to the state as after writing of 'length' bytes. Returned buffer and offset can be used to actually fill "written" segment with data. More...
 
void Flush ()
 
long Seek (long offset, SeekOrigin origin)
 
void SetLength (long value)
 Sets stream length. If current position is greater than specified value, it's set to the value. More...
 
void SetCapacityMinimum (int neededSize)
 Guarantees that the buffer is at least neededSize bytes. More...
 
int Read (byte[] buffer, int offset, int count)
 
void Write (byte[] buffer, int srcOffset, int count)
 
byte ReadByte ()
 
void WriteByte (byte value)
 
void WriteBytes (byte v0, byte v1)
 
void WriteBytes (byte v0, byte v1, byte v2)
 
void WriteBytes (byte v0, byte v1, byte v2, byte v3)
 
void WriteBytes (byte v0, byte v1, byte v2, byte v3, byte v4, byte v5, byte v6, byte v7)
 

Properties

bool CanRead [get]
 
bool CanSeek [get]
 
bool CanWrite [get]
 
int Length [get]
 
int Position [get, set]
 

Constructor & Destructor Documentation

◆ StreamBuffer() [1/2]

ExitGames.Client.Photon.StreamBuffer.StreamBuffer ( int  size = DefaultInitialSize)
inline

◆ StreamBuffer() [2/2]

ExitGames.Client.Photon.StreamBuffer.StreamBuffer ( byte[]  buf)
inline

Member Function Documentation

◆ Compact()

void ExitGames.Client.Photon.StreamBuffer.Compact ( )
inline

The bytes between Position and Length are copied to the beginning of the buffer. Length decreased by Position. Position set to 0.

◆ Flush()

void ExitGames.Client.Photon.StreamBuffer.Flush ( )
inline

◆ GetBuffer()

byte [] ExitGames.Client.Photon.StreamBuffer.GetBuffer ( )
inline

◆ GetBufferAndAdvance()

byte [] ExitGames.Client.Photon.StreamBuffer.GetBufferAndAdvance ( int  length,
out int  offset 
)
inline

Brings StreamBuffer to the state as after writing of 'length' bytes. Returned buffer and offset can be used to actually fill "written" segment with data.

◆ Read()

int ExitGames.Client.Photon.StreamBuffer.Read ( byte[]  buffer,
int  offset,
int  count 
)
inline

◆ ReadByte()

byte ExitGames.Client.Photon.StreamBuffer.ReadByte ( )
inline

◆ Seek()

long ExitGames.Client.Photon.StreamBuffer.Seek ( long  offset,
SeekOrigin  origin 
)
inline

◆ SetCapacityMinimum()

void ExitGames.Client.Photon.StreamBuffer.SetCapacityMinimum ( int  neededSize)
inline

Guarantees that the buffer is at least neededSize bytes.

◆ SetLength()

void ExitGames.Client.Photon.StreamBuffer.SetLength ( long  value)
inline

Sets stream length. If current position is greater than specified value, it's set to the value.

SetLength(0) resets the stream to initial state but preserves underlying byte[] buffer.

◆ ToArray()

byte [] ExitGames.Client.Photon.StreamBuffer.ToArray ( )
inline

Allocates a new byte[] that is the exact used length. Use GetBuffer for nonalloc operations.

◆ ToArrayFromPos()

byte [] ExitGames.Client.Photon.StreamBuffer.ToArrayFromPos ( )
inline

Allocates a new byte[] that is the exact used length. Use GetBuffer for nonalloc operations.

◆ Write()

void ExitGames.Client.Photon.StreamBuffer.Write ( byte[]  buffer,
int  srcOffset,
int  count 
)
inline

◆ WriteByte()

void ExitGames.Client.Photon.StreamBuffer.WriteByte ( byte  value)
inline

◆ WriteBytes() [1/4]

void ExitGames.Client.Photon.StreamBuffer.WriteBytes ( byte  v0,
byte  v1 
)
inline

◆ WriteBytes() [2/4]

void ExitGames.Client.Photon.StreamBuffer.WriteBytes ( byte  v0,
byte  v1,
byte  v2 
)
inline

◆ WriteBytes() [3/4]

void ExitGames.Client.Photon.StreamBuffer.WriteBytes ( byte  v0,
byte  v1,
byte  v2,
byte  v3 
)
inline

◆ WriteBytes() [4/4]

void ExitGames.Client.Photon.StreamBuffer.WriteBytes ( byte  v0,
byte  v1,
byte  v2,
byte  v3,
byte  v4,
byte  v5,
byte  v6,
byte  v7 
)
inline

Property Documentation

◆ CanRead

bool ExitGames.Client.Photon.StreamBuffer.CanRead
get

◆ CanSeek

bool ExitGames.Client.Photon.StreamBuffer.CanSeek
get

◆ CanWrite

bool ExitGames.Client.Photon.StreamBuffer.CanWrite
get

◆ Length

int ExitGames.Client.Photon.StreamBuffer.Length
get

◆ Position

int ExitGames.Client.Photon.StreamBuffer.Position
getset

The documentation for this class was generated from the following file: