#include <ByteBuffer.hpp>
Definition at line 20 of file ByteBuffer.hpp.
ByteBuffer |
( |
unsigned int |
capacity, |
|
|
byte * |
array = 0 |
|
) |
| |
|
inline |
Definition at line 31 of file ByteBuffer.hpp.
33 _buffer = ioByteBuffer_wrap( capacity,
array );
36 _buffer = ioByteBuffer_new( capacity );
Definition at line 40 of file ByteBuffer.hpp.
41 ioByteBuffer_delete( &_buffer );
Definition at line 195 of file ByteBuffer.hpp.
196 return ioByteBuffer_array( _buffer );
void dump |
( |
FILE * |
target | ) |
const |
|
inline |
Definition at line 199 of file ByteBuffer.hpp.
200 ioByteBuffer_dump( _buffer, target );
void get |
( |
byte * |
target, |
|
|
unsigned int |
from, |
|
|
unsigned int |
to |
|
) |
| |
|
inline |
Definition at line 84 of file ByteBuffer.hpp.
85 ioByteBuffer_get( _buffer, target, from, to );
Definition at line 102 of file ByteBuffer.hpp.
104 ioByteBuffer_getByte( _buffer, &value );
Definition at line 92 of file ByteBuffer.hpp.
94 ioByteBuffer_getByte( _buffer, &value );
double getDouble |
( |
void |
| ) |
|
|
inline |
Definition at line 156 of file ByteBuffer.hpp.
158 if( ioByteBuffer_getDouble( _buffer, &value )) {
Definition at line 146 of file ByteBuffer.hpp.
148 ioByteBuffer_getFloat( _buffer, &value );
unsigned int getInt |
( |
void |
| ) |
|
|
inline |
Definition at line 126 of file ByteBuffer.hpp.
127 unsigned int value = 0;
128 ioByteBuffer_getInt( _buffer, &value );
uint64_t getLong |
( |
void |
| ) |
|
|
inline |
Definition at line 136 of file ByteBuffer.hpp.
138 ioByteBuffer_getLong( _buffer, &value );
unsigned short getShort |
( |
void |
| ) |
|
|
inline |
Definition at line 112 of file ByteBuffer.hpp.
113 unsigned short value = 0;
114 ioByteBuffer_getShort( _buffer, &value );
void getString |
( |
char * |
target, |
|
|
unsigned int |
sizeOfTarget |
|
) |
| |
|
inline |
Definition at line 168 of file ByteBuffer.hpp.
169 ioByteBuffer_getString( _buffer, target, sizeOfTarget );
std::string getString |
( |
| ) |
|
|
inline |
Definition at line 176 of file ByteBuffer.hpp.
177 static const unsigned sizeOfTarget = 64*1024;
178 char target[sizeOfTarget];
179 ioByteBuffer_getString( _buffer, target, sizeOfTarget );
180 return std::string( target );
unsigned int limit |
( |
void |
| ) |
const |
|
inline |
Definition at line 72 of file ByteBuffer.hpp.
73 return ioByteBuffer_getLimit( _buffer );
unsigned int position |
( |
void |
| ) |
const |
|
inline |
Definition at line 64 of file ByteBuffer.hpp.
65 return ioByteBuffer_getPosition( _buffer );
void position |
( |
unsigned int |
position | ) |
|
|
inline |
Definition at line 68 of file ByteBuffer.hpp.
69 ioByteBuffer_setPosition( _buffer,
position );
unsigned int position(void) const
void put |
( |
const byte * |
src, |
|
|
unsigned int |
from, |
|
|
unsigned int |
to |
|
) |
| |
|
inline |
Definition at line 80 of file ByteBuffer.hpp.
81 ioByteBuffer_put( _buffer, src, from, to );
Definition at line 183 of file ByteBuffer.hpp.
184 ioByteBuffer_putBuffer( _buffer, source._buffer );
void putBoolean |
( |
bool |
value | ) |
|
|
inline |
Definition at line 98 of file ByteBuffer.hpp.
99 ioByteBuffer_putByte( _buffer, value ? 1 : 0 );
void putByte |
( |
byte |
value | ) |
|
|
inline |
Definition at line 88 of file ByteBuffer.hpp.
89 ioByteBuffer_putByte( _buffer, value );
void putDouble |
( |
double |
value | ) |
|
|
inline |
Definition at line 152 of file ByteBuffer.hpp.
153 ioByteBuffer_putDouble( _buffer, value );
void putFloat |
( |
float |
value | ) |
|
|
inline |
Definition at line 142 of file ByteBuffer.hpp.
143 ioByteBuffer_putFloat( _buffer, value );
void putInt |
( |
unsigned int |
value | ) |
|
|
inline |
Definition at line 118 of file ByteBuffer.hpp.
119 ioByteBuffer_putInt( _buffer, value );
void putIntAt |
( |
unsigned int |
value, |
|
|
unsigned int |
index |
|
) |
| |
|
inline |
Definition at line 122 of file ByteBuffer.hpp.
123 ioByteBuffer_putIntAt( _buffer, value, index );
void putLong |
( |
uint64_t |
value | ) |
|
|
inline |
Definition at line 132 of file ByteBuffer.hpp.
133 ioByteBuffer_putLong( _buffer, value );
void putShort |
( |
unsigned short |
value | ) |
|
|
inline |
Definition at line 108 of file ByteBuffer.hpp.
109 ioByteBuffer_putShort( _buffer, value );
void putString |
( |
const char * |
value | ) |
|
|
inline |
Definition at line 164 of file ByteBuffer.hpp.
165 ioByteBuffer_putString( _buffer, value );
void putString |
( |
const std::string & |
value | ) |
|
|
inline |
Definition at line 172 of file ByteBuffer.hpp.
173 ioByteBuffer_putString( _buffer, value.c_str());
bool receive |
( |
SOCKET |
sckt | ) |
|
|
inline |
Definition at line 191 of file ByteBuffer.hpp.
192 return ioByteBuffer_receive( _buffer, sckt ) == IO_STATUS_NO_ERROR;
unsigned int remaining |
( |
void |
| ) |
const |
|
inline |
Definition at line 76 of file ByteBuffer.hpp.
77 return ioByteBuffer_remaining( _buffer );
void send |
( |
SOCKET |
sckt, |
|
|
struct sockaddr_in & |
target |
|
) |
| |
|
inline |
Definition at line 187 of file ByteBuffer.hpp.
188 ioByteBuffer_send( _buffer, sckt, &target );
The documentation for this class was generated from the following file: