EVBUFFER_LOCK(evbuf);
EVUTIL_ASSERT(buf->read_in_progress && !buf->write_in_progress);
- EVUTIL_ASSERT(nBytes >= 0); // XXXX Can this be false?
+ EVUTIL_ASSERT(nBytes >= 0); /* XXXX Can this be false? */
evbuffer_unfreeze(evbuf, 0);
? 0 : -1;
}
-/*/////////////////////////////////////////////////////////////////// */
+/* ================================================================= */
/* Search support */
/* */
/* the libc resolver has support for searching a number of domains */
}
}
-/*/////////////////////////////////////////////////////////////////// */
+/* ================================================================= */
/* Parsing resolv.conf files */
static void
struct basic_test_data *data = arg;
struct event_base *base = data->base;
struct evconnlistener *listener1 = NULL, *listener2 = NULL;
- //struct event *connecting;
struct sockaddr_in sin;
int count1 = 2, count2 = 1;
struct sockaddr_storage ss1, ss2;
while (evbuffer_get_length(output) < 8192) {
evbuffer_add(output, buf, sizeof(buf));
cs->queued += sizeof(buf);
- // printf("queued %d\n", (int)sizeof(buf));
}
}
size_t len = evbuffer_get_length(input);
evbuffer_drain(input, len);
cs->received += len;
- // printf("read %d bytes\n", (int)len);
}
static void
struct evbuffer *input = bufferevent_get_input(bev);
struct evbuffer *output = bufferevent_get_output(bev);
- // puts("read.");
evbuffer_add_buffer(output, input);
- // printf(" outbuf len is now %d\n", (int)evbuffer_get_length(output));
if (evbuffer_get_length(output) > 1024000)
bufferevent_disable(bev, EV_READ);
}
states = calloc(cfg_n_connections, sizeof(struct client_state));
for (i = 0; i < cfg_n_connections; ++i) {
- // printf("creating %d:\n",i);
bevs[i] = bufferevent_socket_new(base, -1,
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_THREADSAFE);
assert(bevs[i]);