Help for this page

Select Code to Download


  1. or download this
    for (keys %openStreamsSock) {
    
    ...
    ...
    
         $openStreamsSock($streamRequest++) = $sock->accept();
    
  2. or download this
              if (vec($fout, fileno($sock),1))
              {
                $openStreamsSock($streamRequest++) = $sock->accept();
              }
    
  3. or download this
    my $nfound = select ($fout=$fin, undef, undef, 5);
    
  4. or download this
    if (defined ($msgSize) && ($msgSize > 0))
    
  5. or download this
                    else
                    {
    ...
                      close ($openStreamsSock{$streamID});
                      delete ($openStreamsSock{$streamID});
                    }
    
  6. or download this
    say "in 2nd if";
    
    ...
        vec($fin, fileno $CONNECTION, 1) = 1;
        $openStreamsSock{$streamRequest++} = $CONNECTION;
    }
    
  7. or download this
    else
    {
    ...
        vec($fin, fileno $openStreamsSock{$streamID}, 1) = 0;
        close ($openStreamsSock{$streamID});
        delete ($openStreamsSock{$streamID});
    
  8. or download this
    #CLIENT(run in multiple terminals to simulate multiple clients)
    
    ...
    }
    
    close $SOCK;
    
  9. or download this
    #SERVER:
    
    ...
        }
    }