source: branches/2.2.5/mindi-busybox/networking/isrv.h @ 1765

Last change on this file since 1765 was 1765, checked in by Bruno Cornec, 13 years ago

Update to busybox 1.7.2

  • Property svn:eol-style set to native
File size: 953 bytes
RevLine 
[1765]1/* vi: set sw=4 ts=4: */
2/*
3 * Generic non-forking server infrastructure.
4 * Intended to make writing telnetd-type servers easier.
5 *
6 * Copyright (C) 2007 Denis Vlasenko
7 *
8 * Licensed under GPL version 2, see file LICENSE in this tarball for details.
9 */
10
11/* opaque structure */
12struct isrv_state_t;
13typedef struct isrv_state_t isrv_state_t;
14
15/* callbacks */
16void isrv_want_rd(isrv_state_t *state, int fd);
17void isrv_want_wr(isrv_state_t *state, int fd);
18void isrv_dont_want_rd(isrv_state_t *state, int fd);
19void isrv_dont_want_wr(isrv_state_t *state, int fd);
20int isrv_register_fd(isrv_state_t *state, int peer, int fd);
21void isrv_close_fd(isrv_state_t *state, int fd);
22int isrv_register_peer(isrv_state_t *state, void *param);
23
24/* driver */
25void isrv_run(
26    int listen_fd,
27    int (*new_peer)(isrv_state_t *state, int fd),
28    int (*do_rd)(int fd, void **),
29    int (*do_wr)(int fd, void **),
30    int (*do_timeout)(void **),
31    int timeout,
32    int linger_timeout
33);
Note: See TracBrowser for help on using the repository browser.