Go to the documentation of this file.
28 #include "ac-stdint.h"
33 # ifdef JABBERD2_EXPORTS
34 # define JABBERD2_API __declspec(dllexport)
36 # define JABBERD2_API __declspec(dllimport)
39 # define JABBERD2_API extern
44 # define MIO_MAXFD FD_SETSIZE
46 # define MIO_MAXFD 1024
58 #ifdef HAVE_SYS_SOCKET_H
59 # include <sys/socket.h>
66 #ifdef HAVE_SYS_IOCTL_H
67 # include <sys/ioctl.h>
70 #ifdef HAVE_SYS_FILIO_H
71 # include <sys/filio.h>
137 #define mio_free(m) (*m)->mio_free(m)
140 #define mio_listen(m, port, sourceip, app, arg) \
141 (*m)->mio_listen(m, port, sourceip, app, arg)
144 #define mio_connect(m, port, hostip, srcip, app, arg) \
145 (*m)->mio_connect(m, port, hostip, srcip, app, arg)
148 #define mio_register(m, fd, app, arg) \
149 (*m)->mio_register(m, fd, app, arg)
152 #define mio_app(m, fd, app, arg) (*m)->mio_app(m, fd, app, arg)
155 #define mio_close(m, fd) (*m)->mio_close(m, fd)
158 #define mio_write(m, fd) (*m)->mio_write(m, fd)
161 #define mio_read(m, fd) (*m)->mio_read(m, fd)
164 #define mio_run(m, timeout) (*m)->mio_run(m, timeout)
168 # define MIO_ERROR errno
169 # define MIO_SETERROR(e) (errno = e)
170 # define MIO_STRERROR(e) strerror(e)
171 # define MIO_WOULDBLOCK (errno == EWOULDBLOCK || errno == EINTR || errno == EAGAIN)
174 # define MIO_ERROR WSAGetLastError()
175 # define MIO_SETERROR(e) WSASetLastError(e)
176 # define MIO_STRERROR(e) mio_strerror(e)
177 # define MIO_WOULDBLOCK (WSAGetLastError() == WSAEWOULDBLOCK)