[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] immediately flushing bufferevents
Hi,
I'm writing distributed application using the newest version of libevent (2.0.14). To read and write from/to sockets I use recv,send statement and it works perfectly. Now I want to use SSL support provided by libevent. In order to do it I wanted to use bufferevents. The problem is, when I change send statement to bufferevent_write, packets are not sent immediately, but seems to wait for more data to send, and I need to send them immediately (bufferevent_write returns without error). I didn't change watermarks as I think default behaviour shall be to send data immediately.
I tried using bufferevent_flush, but it didn't help.
So here I my questions - is it possible to force bufferevent to send data immediately?
If I understand well (I'm new to SSL) it's impossible to create event by bufferevent_new_ssl_socket and then using unix send(bufferevent_getfd()) statement?
Thanks in advance
PS. I know it may seem like bug in my code during switching from events to
bufferevents, but now I only changed my bufferevent_write statements to
send(bufferevent_getfd()) statements and it works perfectly again....