Classes | |
| struct | wire_message | 
| wire message structure that contains length of the message which is sent before the msg itself  More... | |
Functions | |
| buffer_handle | initialize_buffer () | 
| Initializes buffer with the default size.   | |
| void | destroy_handle (struct buffer_handle b) | 
| 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.   | |
| int | get_message_length (int ret, struct wire_message *wm) | 
| Retrieves length of wire message.   | |
| void * | read_wire_message (struct buffer_handle *buff, int fd) | 
| Reads the msg from socket.   | |
| int | write_wire_message (int fd, const void *buf, int nLength) | 
| Writes the msg to the socket.   | |
Variables | |
| int | current_size = -1 | 
| initial size   | |
| void destroy_handle | ( | struct buffer_handle | b | ) | 
Frees the buffer.
| [in] | b | buffer | 
| int get_message_length | ( | int | ret, | |
| struct wire_message * | wm | |||
| ) | 
Retrieves length of wire message.
| [in] | ret | return value comes from socket communication | 
| [in] | wm | wire message comes from socket communication | 
| 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 | 
| int current_size = -1 | 
initial size
 1.4.7