#include "gobj/stream.h"
#include "gobj/id.h"
#include "gobj/iface.h"
#include "gobj/errors.h"
#include "gobj/utils.h"
Compounds | |
struct | Gj_Stream_struct |
Defines | |
#define | GJ_FLOATBUFLEN 30 |
String buffer for floating pointer numbers length. | |
Functions | |
Gj_Stream* | Gj_stream_new (Gj_Ctx* ctx, Gj_Id* iface, char* addr) |
Create a new stream. More... | |
Gj_Stream* | Gj_stream_newFromIncomingConn (Gj_Ctx* ctx, Gj_IfaceIncomingConn* conn) |
Create a new stream from a Gj_IfaceIncomingConn. More... | |
int | Gj_stream_delete (Gj_Ctx* ctx, Gj_Stream* ptr) |
Destroy a stream. More... | |
char* | Gj_stream_getAddr (Gj_Ctx* ctx, Gj_Stream* stream) |
Get the address of a stream. More... | |
int | Gj_stream_open (Gj_Ctx* ctx, Gj_Stream* stream) |
Open the stream. More... | |
int | Gj_stream_close (Gj_Ctx* ctx, Gj_Stream* stream) |
Close the stream. More... | |
int | Gj_stream_flush (Gj_Ctx* ctx, Gj_Stream* stream) |
Flush the stream. More... | |
int | gj_stream_read2write (Gj_Ctx* ctx, Gj_Stream* stream) |
Switch from read to write mode. More... | |
int | gj_stream_write2read (Gj_Ctx* ctx, Gj_Stream* stream) |
Switch from write to read mode. More... | |
int | gj_stream_write (Gj_Ctx* ctx, Gj_Stream* stream, void* ptr, int size) |
Write size bytes from the given memory location to the lower layers. More... | |
int | gj_stream_writeLow (Gj_Ctx* ctx, Gj_Stream* stream, void* ptr, int size) |
Write size bytes from the given memory location to the lower layers. More... | |
int | gj_stream_read (Gj_Ctx* ctx, Gj_Stream* stream, void* ptr, int size) |
Read size bytes from the lower layers and write them to the given memory location. More... | |
int | gj_stream_readLow (Gj_Ctx* ctx, Gj_Stream* stream, void* ptr, int size) |
Read size bytes from the lower layers and write them to the given memory location. More... | |
int | Gj_stream_writeI32 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_Si32 value) |
Write a 32-bit integer value to the stream. More... | |
int | Gj_stream_writeI16 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_Si16 value) |
Write a 16-bit integer value to the stream. More... | |
int | Gj_stream_writeI8 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_Si8 value) |
Write a 8-bit integer value to the stream. More... | |
int | Gj_stream_writeF64 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_F64 value) |
Write a 64-bit float value to the stream. More... | |
int | Gj_stream_writeF32 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_F32 value) |
Write a 32-bit float value to the stream. More... | |
int | Gj_stream_writeStr (Gj_Ctx* ctx, Gj_Stream* stream, char* string) |
Write a string to the stream. More... | |
int | Gj_stream_readI32 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_Si32* value) |
Read a 32-bit integer value from the stream. More... | |
int | Gj_stream_readI16 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_Si16* value) |
Read a 16-bit integer value from the stream. More... | |
int | Gj_stream_readI8 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_Si8* value) |
Read a 8-bit integer value from the stream. More... | |
int | Gj_stream_readF64 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_F64* value) |
Read a 64-bit float value from the stream. More... | |
int | Gj_stream_readF32 (Gj_Ctx* ctx, Gj_Stream* stream, Gj_F32* value) |
Read a 32-bit float value from the stream. More... | |
int | Gj_stream_readStr (Gj_Ctx* ctx, Gj_Stream* stream, char** string) |
Read a string from the stream. More... |
|
Create a new stream.
|
|
Create a new stream from a Gj_IfaceIncomingConn.
The
|
|
Destroy a stream. The address is not deleted.
|
|
Get the address of a stream.
|
|
Open the stream.
|
|
Close the stream.
|
|
Flush the stream.
|
|
Switch from read to write mode.
For internal use only. |
|
Switch from write to read mode.
For internal use only. |
|
Write size bytes from the given memory location to the lower layers.
For internal use only. |
|
Write size bytes from the given memory location to the lower layers.
For internal use only. |
|
Read size bytes from the lower layers and write them to the given memory location.
For internal use only. |
|
Read size bytes from the lower layers and write them to the given memory location.
For internal use only. |
|
Write a 32-bit integer value to the stream.
|
|
Write a 16-bit integer value to the stream.
|
|
Write a 8-bit integer value to the stream.
|
|
Write a 64-bit float value to the stream.
|
|
Write a 32-bit float value to the stream.
|
|
Write a string to the stream. Accepts string == 0
|
|
Read a 32-bit integer value from the stream.
|
|
Read a 16-bit integer value from the stream.
|
|
Read a 8-bit integer value from the stream.
|
|
Read a 64-bit float value from the stream.
|
|
Read a 32-bit float value from the stream.
|
|
Read a string from the stream.
The string is allocated via
|