#include <sys/stat.h>
#include <fcntl.h>
-#ifndef PORT
+#ifdef DEBUG_CONN
+#define PORT "64006"
+#else
#define PORT "65006"
#endif
ok1(fd2 >= 0);
io_set_finish(io_new_conn(NULL, fd2, init_waker, d), finish_waker, d);
- return io_wait(conn, d, IO_IN, read_buf, d);
+ return io_wait(conn, d, read_buf, d);
}
static int make_listen_fd(const char *port, struct addrinfo **info)
}
freeaddrinfo(addrinfo);
- ok1(io_loop() == d);
+ ok1(io_loop(NULL, NULL) == d);
ok1(d->state == 4);
ok1(memcmp(d->buf, "hellothere", sizeof(d->buf)) == 0);
free(d);