libsent/src/net/rdwt.c File Reference

Low level functions for TCP/IP inter-process communication. More...

#include <sent/stddefs.h>
#include <sent/tcpip.h>

Go to the source code of this file.

Defines

#define BUFSZ   4096
 Buffer size.

Functions

int rd (int fd, char *data, int *len, int maxlen)
 Read a data segment from a network stream.
int wt (int fd, char *data, int len)
 Write a data segment to a network stream.


Detailed Description

Low level functions for TCP/IP inter-process communication.

Author:
Akinobu LEE
Date:
Wed Feb 16 07:09:25 2005
Revision
1.1.1.1

Definition in file rdwt.c.


Function Documentation

int rd ( int  fd,
char *  data,
int *  len,
int  maxlen 
)

Read a data segment from a network stream.

This function will block until the specified length has been received.

Parameters:
fd [in] file descriptor
data [out] buffer to store the read data
len [out] received length in bytes
maxlen [in] maximum length of data buffer in bytes
Returns:
received data length in bytes, or -1 on error.

Definition at line 44 of file rdwt.c.

Referenced by adin_tcpip_read().

int wt ( int  fd,
char *  data,
int  len 
)

Write a data segment to a network stream.

Parameters:
fd [in] file descriptor
data [in] buffer that holds data to write
len [out] received length in bytes
Returns:
actually written data length in bytes, or -1 on error.

Definition at line 92 of file rdwt.c.

Referenced by adin_tcpip_send_pause(), adin_tcpip_send_resume(), and adin_tcpip_send_terminate().


Generated on Tue Dec 18 16:01:39 2007 for Julius by  doxygen 1.5.4