[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Ability to shutdown() socket with bufferevents?



I'm needing the ability to shutdown(fd, 1) on a bufferevent managed
socket [created with bufferevent_socket_new() and
bufferevent_socket_connect()] as part of my protocol.   The flow of
which looks somethign like this:

Client opens connection to server
Client sends data.
Client closes the sending side of the socket to indicate EOF.
Server sees EOF and closes the receive side of the socket
Client

For my first pass at this client, I'm using a bufferevent, but without
an obvious way to send a EOF, it seems like I'm stuck.  It appears
that at some point in the future, bufferevent_flush(..., EV_WRITE,
BEV_FINISHED) may provide what I'm looking for, but its not yet
implemented.

Anyone have any suggestions?

I could switch to managing my own socket I/O if I need to, perhaps
someone could provide an example just using straight events.

Thanks in advance!
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.