Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: perl socket comunication

by monoxide (Beadle)
on Oct 01, 2007 at 03:44 UTC ( #641841=note: print w/replies, xml ) Need Help??


in reply to perl socket comunication

I recently discovered Net::Sockets::NonBlock which is a nice solution for the server side, taking care of all the IO and select calls for you. The example in the documentation is a proxy server, which was exactly what I was looking for, but if you get rid of some of the code you have a ready to use listen server, you just need to add in some code to parse/handle data coming from clients.

Threads aren't required for what you want to do, although they could be used, depending on what exactly you want to do. Net::Sockets::NonBlock isn't thread compatible though, so you'll need to find another solution if you want to use a threaded solution.

monoxide

Replies are listed 'Best First'.
Re^2: perl socket comunication
by Anonymous Monk on Oct 01, 2007 at 09:33 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://641841]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2021-03-02 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (42 votes). Check out past polls.

    Notices?