Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Andrew Tkachenko
December 8, 2004, 10:31 am
rate this thread
I'm trying to build a server aimed to be a 'bridge' between internal clients
and external servers (a kind of proxy server). So for each incoming
client's connection server creates another socket connected to external
server and then transfers data between those two sockets. Server allows up
to 300 simultaneously connected clients.
I'm quite lazy so I'm trying to play with Event.pm willing to avoid
dispatching IO events by myself. So the question is: what is the better way
to use Event.pm :
a). create new pair of watchers each time when incoming connection detected
b). keep 600 watchers (300 for client socks and 300 for external socks) and
modify watcher's 'fd' attribute (using $watcher->fd method) 'on-the-fly' ?
Thanks a lot for advance.