Eventio branch--timeout, fd.c, pconnRead

From: madhav <madhav@dont-contact.us>
Date: Thu, 08 Nov 2001 12:32:01 -0800

Hello Henrik and Adrian

While working on the eventio branch, we came across the following
problems:

1. We are changing the pconn.c file to use filehandle* instead of fd.
In pconn.c, the pconnRead function reads data from a fd,
and then immediately closes the fd. Is there any reason for reading the
data if we don't use it?

2. In fd.c, there are functions that tell how many file descriptors are
left; specfically fd_open(), fd_close(),
fdNFree(), and others. Should we create a new file "nfd.c" that ports
all these functions to use filehandle*?
Instead of the "fde fd_table[]", we would create a "filehandle*
fh_table" that just tracks how
many free file descriptors are left.

3. It was mentioned that the timeout functions have not been decided
for the eventio branch. We came up with
the following changes for timeouts:

In the file ncomm_internals.h:
struct _filehandle {
    ...
    COMMTIMEOUTCB *timeout_handler;
    time_t timeout;
    void *timeout_data;
    void *lifetime_data;
};

In ncomm.c:
void ncommSetTimeout(filehandle *fh, int timeout,
COMMTIMEOUTCB *handler, void *data);
typedef void
COMMTIMEOUTCB(filehandle *fh, void *data);

For right now, we are just leaving the timeout code as it is.

Thanks
Madhav and Venkatesh
madhav@visolve.com, gv_kovai@yahoo.com
Received on Thu Nov 08 2001 - 13:35:11 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:37 MST