libevent buffered events and half-closed sockets
Posted
by Vi
on Stack Overflow
See other posts from Stack Overflow
or by Vi
Published on 2010-03-13T03:37:28Z
Indexed on
2010/03/13
3:37 UTC
Read the original article
Hit count: 492
It is simple to implement a port mapper using bufferevent_* functions of libevent.
However, the documentation states that "This file descriptor is not allowed to be a pipe(2)".
Will libevent work correctly if I shutdown the socket in one direction shutdown(socket, SHUT_WR);
? I expect it to discard remaining data in the buffer and not write there anymore, but continue reading from socket and calling a read handler.
© Stack Overflow or respective owner