ixp_serverloop.3 (994B)
1 .TH "IXP_SERVERLOOP" 3 "2010 Jun" "libixp Manual" 2 3 .SH NAME 4 .P 5 ixp_serverloop, IxpServer 6 7 .SH SYNOPSIS 8 .nf 9 #include <ixp.h> 10 11 int ixp_serverloop(IxpServer *srv); 12 13 typedef struct IxpServer IxpServer; 14 struct IxpServer { 15 IxpConn* conn; 16 IxpMutex lk; 17 IxpTimer* timer; 18 void (*preselect)(IxpServer*); 19 void* aux; 20 int running; 21 int maxfd; 22 fd_set rd; 23 } 24 .fi 25 26 .SH DESCRIPTION 27 .P 28 Enters the main loop of the server. Exits when 29 IsrvR\->running becomes false, or when select(2) returns an 30 error other than EINTR. 31 32 .SH RETURN VALUE 33 .P 34 Returns 0 when the loop exits normally, and 1 when 35 it exits on error. \fBerrno(3)\fR or the return value of 36 \fBixp_errbuf(3)\fR may be inspected. 37 38 .SH SEE ALSO 39 .P 40 ixp_listen(3), ixp_settimer(3) 41 42 43 .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net) 44 .\" cmdline: txt2tags -o- ixp_serverloop.man3 45