#include <glib.h>
#include "packet.h"
Go to the source code of this file.
Typedefs | |
typedef g2packetstream_s | g2packetstream_t |
Functions | |
g2packetstream_t * | g2_packetstream_new (gpointer *connection) |
Allocate a new packet stream. | |
g2packetstream_t * | g2_packetstream_get (gpointer *connection) |
Get a packet stream for the given connection. | |
void | g2_packetstream_free (gpointer *connection) |
Free a packet stream from memory. | |
int | g2_packetstream_put_data (g2packetstream_t *stream, char *data, int length) |
Put data in a given packet stream. | |
g2packet_t * | g2_packetstream_get_packet (g2packetstream_t *stream) |
Get a packet from the packetstream. | |
int | g2_packetstream_get_error (g2packetstream_t *stream, char **errormessage) |
Gets an error from the packetstream. |
|
|
|
Free a packet stream from memory.
|
|
Get a packet stream for the given connection. Returns the g2 packet stream associated with the given pointer. If no packetstream could be found, NULL is returned.
|
|
Gets an error from the packetstream. Gets an error, if any, from the packetstream. Any error indication could indicate out of sync and as a result the connection should be dropped.
|
|
Get a packet from the packetstream. Gets a packet from the packetstream, if there are no packets available, NULL is returned.
|
|
Allocate a new packet stream. Allocates a new packet stream with the given connection as an identifier. Or if the connection allready exists, the existing connection is returned.
|
|
Put data in a given packet stream. Puts received data in the given packet stream.
|