On Tue, Jun 21, 2011 at 1:31 PM, Zabrane wrote:
> Hi Brandon,
> Could your proxy code be shared for new comers (as me)?
> It'll be very good if build up a repository of libev examples.
Unfortunately it's not very good example code in its current state.
It uses unportable things (e.g. Linux's spli
Hi Brandon,
Could your proxy code be shared for new comers (as me)?
It'll be very good if build up a repository of libev examples.
Regards
Zab
Le 20 juin 11 à 17:59, Brandon Black a écrit :
2011/6/20 Jaime Fernández :
b) What's the most convenient way to write data in a TCP socket:
1.-
Thanks Brandon,
You've provided a great information. In fact, I was trying to create a very
simple proxy which routes according to some criteria. Your hints will be
very helpful.
___
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bi
2011/6/20 Jaime Fernández :
> b) What's the most convenient way to write data in a TCP socket:
> 1.- "send" data directly in the read callback
> 2.- Create a write watcher
> 3.- Create a watcher of both types: READ&WRITE.
It really depends on the nature of the protocol and the data tra
> Well, I've just found out why the "Invalid file descriptor" was generated. I
> didn't stop the "read watcher" when creating the "write watcher".
>
> So, I just maintain my second question:
> What's the most convenient way to write data in a TCP socket:
> 1.- "send" data directly in the read
Well, I've just found out why the "Invalid file descriptor" was generated. I
didn't stop the "read watcher" when creating the "write watcher".
So, I just maintain my second question:
What's the most convenient way to write data in a TCP socket:
1.- "send" data directly in the read callback
I'm starting with libev and I've followed this example:
http://codefundas.blogspot.com/2010/09/create-tcp-echo-server-using-libev.html
which creates an echo server. However, I don't think it's not the most
efficient approach because the writing could get blocked, isn't it?
So, what I've done is:
a