Go to the source code of this file.
Classes | |
struct | buffer_handle |
structure for buffer that contains data and current size of the data More... | |
Functions | |
buffer_handle | initialize_buffer () |
Initializes buffer with the default size. | |
void | destroy_handle (struct buffer_handle) |
Frees the buffer. | |
void | update_buffer_size (struct buffer_handle *bh, int new_size) |
Updates buffer size with the max of given size and current size. | |
void * | read_wire_message (struct buffer_handle *bh, int fd) |
Reads the msg from socket. | |
int | write_wire_message (int fd, const void *buf, int nLength) |
Writes the msg to the socket. |
void destroy_handle | ( | struct buffer_handle | b | ) |
Frees the buffer.
[in] | b | buffer |
struct buffer_handle initialize_buffer | ( | ) |
void* read_wire_message | ( | struct buffer_handle * | buff, | |
int | fd | |||
) |
Reads the msg from socket.
[in] | buff | buffer |
[in] | fd | socket id |
void update_buffer_size | ( | struct buffer_handle * | bh, | |
int | new_size | |||
) |
Updates buffer size with the max of given size and current size.
[in] | bh | buffer |
[in] | new_size | new size of the buffer |
int write_wire_message | ( | int | fd, | |
const void * | buf, | |||
int | nLength | |||
) |
Writes the msg to the socket.
[in] | fd | socket id |
[in] | buf | buffer |
[in] | nLength | length of the msg |