/
teeny/db/
teeny/dbm/
teeny/doc/
teeny/includes/
#ifndef	_INCL_BUFFER_H


/*
Copyright(C) 1990, Marcus J. Ranum, All Rights Reserved.
This software may be freely used, modified, and redistributed,
as long as this copyright message is left intact, and this
software is not used to develop any commercial product, or used
in any product that is provided on a pay-for-use basis.
*/

#define	IOSTATE_OK	0
#define	IOSTATE_ERR	1
#define	IOSTATE_HUNGUP	2

/* Slightly over 512, just for luck. */

#define MUDBUFSIZ	516

/*
IO buffer states. - a simple state machine
*/
#define	INPUT_NEWCONN	0
#define	INPUT_PLAY	1


/*
an Iob is a per-user I/O buffer with file descriptor, type flag,
etc. Ubermud specific fields are 'typ' and 'uid'.
*/
struct Iob {
	int		typ;	/* defined in ubermud.h */
	int		player;
	int		state;	/* connection status */

	int		quota;   /* how many commands left this slice */
	long		connect; /* time connected */
	long		lastcmd; /* time of last command. */
	int		blown;   /* number of times quota blown this session */

	struct Iob	*whofwd;
	struct Iob	*whoback;

	int		fd;
	int		inputcnt;
	int		outputcnt;
	int		outputtries;	/* A kludge. Don't ask */
	char		inputbuf[MUDBUFSIZ]; /* Space for terminator */
	char		outputbuf[MUDBUFSIZ];
};
typedef struct Iob Iob;

#define	_INCL_BUFFER_H
#endif