]>
Commit | Line | Data |
---|---|---|
212380e3 AC |
1 | /************************************************************************ |
2 | * IRC - Internet Relay Chat, servlink/io.h | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 1, or (at your option) | |
7 | * any later version. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License | |
15 | * along with this program; if not, write to the Free Software | |
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
17 | * | |
18 | * $Id: io.h 6 2005-09-10 01:02:21Z nenolod $ | |
19 | */ | |
20 | ||
21 | #ifndef INCLUDED_servlink_io_h | |
22 | #define INCLUDED_servlink_io_h | |
23 | ||
24 | #include "control.h" | |
25 | ||
26 | #define IO_READ 0 | |
27 | #define IO_WRITE 1 | |
28 | #define IO_SELECT 2 | |
29 | ||
30 | #define IO_TYPE(io) ((io==IO_SELECT)?"select": \ | |
31 | ((io==IO_WRITE)?"write":"read")) | |
32 | ||
33 | #define FD_NAME(fd) (fd_name(fd)) | |
34 | ||
35 | extern void io_loop(int nfds); | |
36 | extern void write_data(void); | |
37 | extern void read_data(void); | |
38 | extern void write_ctrl(void); | |
39 | extern void read_ctrl(void); | |
40 | extern void write_net(void); | |
41 | extern void read_net(void); | |
42 | extern void send_error(const char *, ...); | |
43 | extern void send_data_blocking(int fd, unsigned char *data, int datalen); | |
44 | extern cmd_handler process_recvq; | |
45 | extern cmd_handler process_sendq; | |
46 | extern cmd_handler send_zipstats; | |
47 | ||
48 | #endif /* INCLUDED_servlink_io_h */ |