libevent buffered events and half-closed sockets
- by Vi
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.