You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
501 B

#ifndef SOCKET_H
#define SOCKET_H
extern int s_running;
enum {
SM_READ = 1,
typedef int(*socket_func)(int fd, int can_write, int can_read, void *arg);
void register_socket(int fd, int mode, socket_func socket_func, void *arg);
void deregister_socket(int fd);
void *socket_run(void *arg);
void socket_init(void);
void socket_set_nonblock(int fd);
void socket_set_nodelay(int fd);
void socket_flag_write(int fd);
void socket_clear_write(int fd);
#endif /* SOCKET_H */