ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
Loading...
Searching...
No Matches
XmobiTea.ProtonNetCommon.IMemoryBuffer Interface Reference

Interface defining the operations for a memory buffer. More...

Inheritance diagram for XmobiTea.ProtonNetCommon.IMemoryBuffer:
XmobiTea.ProtonNetCommon.MemoryBuffer

Public Member Functions

bool IsEmpty ()
 Checks if the buffer is empty.
 
byte[] ToArray ()
 Converts the buffer to a byte array.
 
byte[] ToArray (int position, int length)
 Converts a portion of the buffer to a byte array.
 
void Clear ()
 Clears the buffer.
 
string ExtractString (int position, int length)
 Extracts a string from the buffer.
 
void Remove (int position, int length)
 Removes a portion of the buffer.
 
void Reserve (int capacity)
 Reserves additional capacity for the buffer.
 
void Resize (int length)
 Resizes the buffer to the specified length.
 
void Shift (int positionAmount)
 Shifts the current position in the buffer.
 
int Write (byte value)
 Writes a byte to the buffer.
 
int Write (string text)
 Writes a string to the buffer.
 
int Write (byte[] buffer)
 Writes a byte array to the buffer.
 
int Write (byte[] buffer, int position, int length)
 Writes a portion of a byte array to the buffer.
 

Properties

int Capacity [get]
 Gets the capacity of the buffer.
 
byte[] Buffer [get]
 Gets the byte array buffer.
 
int Length [get]
 Gets the current length of the buffer.
 
int Position [get]
 Gets the current position in the buffer.
 
byte this[int index] [get]
 Gets the byte at the specified index.
 

Detailed Description

Interface defining the operations for a memory buffer.

Member Function Documentation

◆ Clear()

void XmobiTea.ProtonNetCommon.IMemoryBuffer.Clear ( )

Clears the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ ExtractString()

string XmobiTea.ProtonNetCommon.IMemoryBuffer.ExtractString ( int position,
int length )

Extracts a string from the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ IsEmpty()

bool XmobiTea.ProtonNetCommon.IMemoryBuffer.IsEmpty ( )

Checks if the buffer is empty.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Remove()

void XmobiTea.ProtonNetCommon.IMemoryBuffer.Remove ( int position,
int length )

Removes a portion of the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Reserve()

void XmobiTea.ProtonNetCommon.IMemoryBuffer.Reserve ( int capacity)

Reserves additional capacity for the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Resize()

void XmobiTea.ProtonNetCommon.IMemoryBuffer.Resize ( int length)

Resizes the buffer to the specified length.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Shift()

void XmobiTea.ProtonNetCommon.IMemoryBuffer.Shift ( int positionAmount)

Shifts the current position in the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ ToArray() [1/2]

byte[] XmobiTea.ProtonNetCommon.IMemoryBuffer.ToArray ( )

Converts the buffer to a byte array.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ ToArray() [2/2]

byte[] XmobiTea.ProtonNetCommon.IMemoryBuffer.ToArray ( int position,
int length )

Converts a portion of the buffer to a byte array.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Write() [1/4]

int XmobiTea.ProtonNetCommon.IMemoryBuffer.Write ( byte value)

Writes a byte to the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Write() [2/4]

int XmobiTea.ProtonNetCommon.IMemoryBuffer.Write ( byte[] buffer)

Writes a byte array to the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Write() [3/4]

int XmobiTea.ProtonNetCommon.IMemoryBuffer.Write ( byte[] buffer,
int position,
int length )

Writes a portion of a byte array to the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Write() [4/4]

int XmobiTea.ProtonNetCommon.IMemoryBuffer.Write ( string text)

Writes a string to the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

Property Documentation

◆ Buffer

byte [] XmobiTea.ProtonNetCommon.IMemoryBuffer.Buffer
get

Gets the byte array buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Capacity

int XmobiTea.ProtonNetCommon.IMemoryBuffer.Capacity
get

Gets the capacity of the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Length

int XmobiTea.ProtonNetCommon.IMemoryBuffer.Length
get

Gets the current length of the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ Position

int XmobiTea.ProtonNetCommon.IMemoryBuffer.Position
get

Gets the current position in the buffer.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.

◆ this[int index]

byte XmobiTea.ProtonNetCommon.IMemoryBuffer.this[int index]
get

Gets the byte at the specified index.

Implemented in XmobiTea.ProtonNetCommon.MemoryBuffer.


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