Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/networking/isrv.h
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/networking/isrv.h
r2725 r3621 24 24 int isrv_register_peer(isrv_state_t *state, void *param); 25 25 26 /* driver */ 26 /* Driver: 27 * 28 * Select on listen_fd for <linger_timeout> (or forever if 0). 29 * 30 * If we time out and we have no peers, exit. 31 * If we have peers, call do_timeout(peer_param), 32 * if it returns !0, peer is removed. 33 * 34 * If listen_fd is active, accept new connection ("peer"), 35 * call new_peer() on it, and if it returns 0, 36 * add it to fds to select on. 37 * Now, select will wait for <timeout>, not <linger_timeout> 38 * (as long as we have more than zero peers). 39 * 40 * If a peer's fd is active, we call do_rd() on it if read 41 * bit was set, and then do_wr() if write bit was also set. 42 * If either returns !0, peer is removed. 43 * Reaching this place also resets timeout counter for this peer. 44 * 45 * Note that peer must indicate that he wants to be selected 46 * for read and/or write using isrv_want_rd()/isrv_want_wr() 47 * [can be called in new_peer() or in do_rd()/do_wr()]. 48 * If it never wants to be selected for write, do_wr() 49 * will never be called (can be NULL). 50 */ 27 51 void isrv_run( 28 52 int listen_fd,
Note:
See TracChangeset
for help on using the changeset viewer.