[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] How can I write exact length of a evbuffer?
- To: <libevent-users@xxxxxxxxxxxxx>
- Subject: [Libevent-users] How can I write exact length of a evbuffer?
- From: Dawen Rie <dawenhing@xxxxxxx>
- Date: Sat, 14 Apr 2012 16:15:13 +0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Sat, 14 Apr 2012 04:15:36 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Received:User-Agent:Date:Subject:From:To:Message-ID: Thread-Topic:Mime-version:Content-type: Content-transfer-encoding; bh=PQ1DOImYwdhH8kkIPSBnmQHY0Viq3DkBNw BGT2J88qY=; b=LJ0/JgdIxxGA4fyDgDgBsVq9lim9kbPdEmVPeImbxAo4XPco9r qeyoHtTJpUfgyuIHkOf8QE80dfuq9CTOMqUOCxAOh4KrlF8pKGwd0Io+qj9/bNPF 7sEY3NZCqHUaWKk9UJSOvObBEzF/SsWLYqqxOqQq8Z6DMSXx4EqGi+/K0=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
- Thread-topic: How can I write exact length of a evbuffer?
- User-agent: Microsoft-MacOutlook/14.10.0.110310
Hello everybody. I am a new user of libevent. I can't find the correct API
to do my work.
I had found the API:
int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer
*buf);
It will send all data of evbuffer. But I just want to send a special
length not all.
And API:
int bufferevent_write(struct bufferevent *bufev, const void *data, size_t
size);
It require me copy out the data from evbuffer, I think it's inefficiency.
So, is there andy API like:
int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer
*buf, size_t size);
It just send size of data in but?
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.