/* netio/fget_netio_internal.h. Generated from netio_internal.h.in by configure. */
/*
** Copyright 1998-2002 University of Illinois Board of Trustees
** Copyright 1998-2004 Mark D. Roth
** All rights reserved.
**
** fget_netio_internal.h - internal header file for network I/O module
**
** Mark D. Roth <roth@feep.net>
*/
#ifndef fget_NETIO_INTERNAL_H
#define fget_NETIO_INTERNAL_H
#include <config.h>
#include <compat.h>
#include <fget_netio.h>
#ifdef STDC_HEADERS
# include <stdarg.h>
#endif
/* useful constant */
#define NETIOBUFSIZE 10240
/* structure for NETIO handle */
struct netio
{
/*
** state information set by netio code - may not be modified by caller
*/
char *n_buf; /* read buffer */
size_t n_bufsize; /* size of read buffer */
char *n_writep; /* write ptr (points into n_buf) */
int n_fd; /* file descriptor */
unsigned short n_listener; /* boolean flag for listener */
char n_host[MAXHOSTNAMELEN + 6]; /* hostname */
unsigned short n_eof; /* boolean flag indicating EOF */
/*
** data set by the calling application - may be modified
*/
char *n_default_service; /* default service name */
unsigned short n_default_port; /* default port */
netio_hookfunc_t n_sendhook; /* send hook */
netio_hookfunc_t n_recvhook; /* receive hook */
void *n_hook_handle; /* lib handle ptr for send/recv hooks */
void *n_hook_data; /* app data ptr for send/recv hooks */
};
/***** handle.c **************************************************************/
int fget_netio_service_port(char *);
/***** options.c *************************************************************/
/*
** netio_init_options() - initialize NETIO options
*/
void fget_netio_init_options(NETIO *);
/*
** netio_vset_options() - set an option in the NETIO handle
*/
void fget_netio_vset_options(NETIO *, va_list);
/***** timeout.c *************************************************************/
/* wait for I/O operation */
int fget_netio_wait(NETIO *, int, time_t);
#endif /* ! fget_NETIO_INTERNAL_H */
syntax highlighted by Code2HTML, v. 0.9.1