/
teeny/db/
teeny/dbm/
teeny/docs/
teeny/includes/
teeny/misc/
teeny/news/
teeny/text/
/* io.h */

#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. 
 */
struct Iob
{
  int             typ;
  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 */
  long            site;         /* IP of site connecting from */

  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];
  char            hostname[128];
  char            doing[128];   /* What the player claims to be doing */
  char           *outputprefix;
  char           *outputsuffix;
};
typedef struct Iob Iob;

extern int      mud_port;