Antonio Lonardo wrote:

> Hello,
> 
> I'm new to socket program in perl, and I'm having a
> problem with a UDP server I've written.  It's a very
> simple routine, using IO::Socket::INET and consisting
> mainly of a while loop such as the following to handle
> the incoming requests:
> 
> while ($server_socket->recv($msg, $MAXLEN))
> {
>    ...    
> 
> }
> 
> Anyway, this works primarily, except after a random
> amount of time it seems to hang, and requires a ctrl-C
> on the input window in order to continue.  When the
> ctrl-C is given, it appears that a giant queue has
> been built up behind this hung process, and it
> dequeues rapidly.  Any idea why this might happen?

Not really, but you could try using select prior to reading
so you only read when there is data available.

-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to