Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

TCP Server hangs with multiple client connections

by rmahin (Beadle)
on Aug 02, 2012 at 17:45 UTC ( #985084=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ref->{poolObj} = $clientPool;
    exit 1 if ($clientPool->startPool(baseThreads => 10, moduleName => "SE
    +RVER::Main", subName => "clientThreadPool", values => $ref));
    
  2. or download this
    # Open Server Socket
    my $sock = IO::Socket::INET->new(Proto => 'tcp',
    ...
        }
    }
    
  3. or download this
            my $fd = @$work[0];
            our $clientaddr = @$work[1];
    ...
    
            # Get the password sent by client
            my $clientpass = <$fh>;    
    
  4. or download this
            # create and add socket file handle so it can be checked withi
    +n the while loop
            my $select = IO::Select->new();
    ...
                }
                
            }
    
  5. or download this
        # execute the command and save results in a file handle to reduce 
    +memory usage
        if (($head =~ /.+/) && ($tail =~ /.+/)) {
    ...
            }
            close ($fh);
        }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://985084]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-08-02 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (55 votes), past polls