W_QUERYSTATUS(3)		WLIB-CALLS		W_QUERYSTATUS(3)

NAME

	w_querystatus()

SYPNOSIS

	#include <Wlib.h>

	short w_querystatus(STATUS *st, short index);

	where STATUS is declared as:

	typedef struct {
		ulong	ip_addr;
		long	pakets, bytes;
		short	windows;
		short	res[4];
	} STATUS;

DESCRIPTION

	 w_querystatus() allows you to get some status information about W in
	total or a particular client. if you give a negative index you will
	get the complete server statistic as well as the number of currently
	running clients which you may then query successively by counting
	index from 0 to n-1.

	 the server information includes:

	- pakets: number of pakets processed
	- bytes: number of bytes received
	- res[0]: number of windows currently used
	- res[1]: total number of windows
	- rec[2]: number of rectangles currently used
	- rec[3]: total number of rectangles

	 the client information includes:

	- ip_addr: adress of client if != 0, otherwise local
	- pakets: number of pakets processed
	- bytes: number of bytes received
	- windows: number of windows this clients uses

	 all other fields will not contain useful data. note that the number of
	clients may of course change during inquiring them all, so be prepared
	to get an error before you've read them all.

RETURNS

	- number of clients (positive) if you asked for global statistic

	- anything else (negative) if an error occured

LAST CHANGED

	12/94 by TeSche, itschere@techfak.uni-bielefeld.de
