better way of Event.pm usage

  • Thread starter Andrew Tkachenko
  • Start date
A

Andrew Tkachenko

Hello.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,268
Messages
2,571,096
Members
48,773
Latest member
Kaybee

Latest Threads

Top