Sorry, I dont know much about IO::Socket module, but here are some tips....
use IO::Socket qw (:DEFAULT :crlf);

>$EOL1 = "\012";
>$EOL2 = "\015";

can be $/=crlf; so no more of,
>$input =~ s/$EOL1//g;
>$input =~ s/$EOL2//g;
just chomp($input);

this is how threading and forking would work. After your recieved a
connection you either fork off a child , or call on a socket.
>while ($client = $server->accept()){
        fork{
        ...
        }
}

also consider closing the log inside your while loop. Are you trying to
write a DHCP server ???

Mark
----- Original Message -----
From: "Mat Harris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 7:35 PM
Subject: more socket stuff - 2nd part


i have sorted the two-way communication stuff but no I am having trouble
doing the multithreaded version. I have no experience using fork or anything
to do with spawing or pid's.

Looking at the multithreaded server example on the sockets page on
perldoc.com, please could someone help me convert the attached server script
into a multithreaded server.

I would be very grateful.

thanks

I have also attached the partially completed client just to show how it all
fits together.

--
Mat Harris OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED] www.genestate.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to