Help for this page

Select Code to Download


  1. or download this
    # $readable_handles = Select::IO->new();
    # $readable_handles->add($server_sock);
    
      $select_object = Select::IO->new($server_sock);
    
  2. or download this
    #while(1){
    while(@readables = $select_object->can_read){
    
  3. or download this
    # if( $sck eq $sock ){}
    if( $sck == $sock ){}
    
  4. or download this
                else {
    # store message in queue
    ...
         $hash{$sock} = 
            $clients[ scalar @{$select_object->can_write()} ]
    
  5. or download this
    #!/usr/bin/perl
    use utf8;
    ...
    }