Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Socket Help
08-05-2009, 03:03 PM #1
- Join Date
- Jun 2009
- Thanked 0 Times in 0 Posts
I have a bit of a tough one for me.
I have a server which I give a word to (say 'Chanel1').
It responds with whether the chanel is currently siezed and some other stats.
Depending on this responce I need to fire off a script.
There are some limits like the amount of times you can check for the chanel to be free (5 checks per second total).
Other things I would like to implement is some kind of restart script so if it dies before it gets the chanel free it will restart the checking. And logging if possible.
Another part is sometimes I need to check multiple chanels and as each one becomes available run the script on it.
I think I need to use Sockets to achieve this?
What Im after is any good reading on this and other bits of the puzzle I would need? Im not looking for someone to write the code.
I do have experiance in PHP butI am new to Perl so any help on where to look/start would be great.
08-05-2009, 03:25 PM #2
- Join Date
- May 2005
- Southern tip of Silicon Valley
- Thanked 180 Times in 175 Posts
The best resource book that I know of for this type of task is "Network Programming with Perl" by Lincoln D. Stein
You'll also want to read the docs for the Socket and IO::Socket modules.
For the logging requirment, I'd use Log::Log4perl