[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] Ability to shutdown() socket with bufferevents?
- To: libevent-users@xxxxxxxx
- Subject: [Libevent-users] Ability to shutdown() socket with bufferevents?
- From: Corey Stup <coreystup@xxxxxxxxx>
- Date: Tue, 27 Jul 2010 12:55:45 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Tue, 27 Jul 2010 12:56:12 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=/oWiZ/hoq3jpfLCd55TDYDRpuIWoxJAvbDDzSPC5Gvs=; b=cvHTIZilteIHSKrb0AdLenatRsKK0rlo4VIpq0K+uZhdQUGrKOrgRs+yI62CmHeq5K 43V3CeYcr4Pg75jRrp2nkm2e9AZLduFcuLFgFD9qi15ysXNqK5ynP43dXSD9QXIm2Ykm 4P58VS0q2orOb6zilCY2gtWNaAWJIf7/rN9LM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=osKQfY01KEpMqfuyi2z5HS/OmdGO4gAAoTeWGJPqJEhxz7elayv33oCdd/Hn2gReYv 5PHHGEaH4Xl+YXcvz+E2NhsjKkF+3cMdtmta5MiwPIEx95slulWRRkw0hg+sjd+S5G5d tSOx662TdaIYL8eWnvCUSFGCDWRgWxa1Muf+4=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
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.