I wonder if forking could really be as easy as putting fork() in the place
you have marked. It will be great if it does, but I am sure there is loads
of other stuff like managing pid's etc. Lets hope you are right.

Not a DHCP server, its the update system for a dynamic DNS server. I found a
DNS server that uses a mysql backend. neat huh?

On Tue, Dec 31, 2002 at 04:55:52 -0500, Mark Goland wrote:
> 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

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

Attachment: msg35695/pgp00000.pgp
Description: PGP signature

Reply via email to