low_level_net.h File Reference

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.


Function Documentation

void destroy_handle ( struct buffer_handle  b  ) 

Frees the buffer.

Parameters:
[in] b buffer

struct buffer_handle initialize_buffer (  ) 

Initializes buffer with the default size.

Returns:
buffer_handle buffer

void* read_wire_message ( struct buffer_handle buff,
int  fd 
)

Reads the msg from socket.

Parameters:
[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.

Parameters:
[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.

Parameters:
[in] fd socket id
[in] buf buffer
[in] nLength length of the msg
Returns:
success of write


Generated on Wed Dec 15 10:46:16 2010 for Hazy_System by  doxygen 1.4.7