o New evutil_make_listen_socket_reuseable() to abstract SO_REUSEADDR.
o New bind-to option to allow DNS clients to bind to an arbitrary port for outgoing requests.
o evbuffers can now be "frozen" to prevent operations at one or both ends.
-
+ o Bufferevents now notice external attempts to add data to an inbuf or remove it from an outbuf, and stop them.
Changes in 1.4.0:
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
}
}
+ evbuffer_unfreeze(input, 0);
res = evbuffer_read(input, fd, howmuch);
+ evbuffer_freeze(input, 0);
if (res == -1) {
int err = evutil_socket_geterror(fd);
}
if (EVBUFFER_LENGTH(bufev->output)) {
+ evbuffer_unfreeze(bufev->output, 1);
res = evbuffer_write(bufev->output, fd);
+ evbuffer_freeze(bufev->output, 1);
if (res == -1) {
int err = evutil_socket_geterror(fd);
if (EVUTIL_ERR_RW_RETRIABLE(err))
evbuffer_add_cb(bufev->output, bufferevent_socket_outbuf_cb, bufev);
+ evbuffer_freeze(bufev->input, 0);
+ evbuffer_freeze(bufev->output, 1);
+
return bufev;
}