Help for this page

Select Code to Download


  1. or download this
    use Socket qw( PF_INET SOCK_STREAM inet_aton );
    
    ...
    my $old_fh = select(SOCKET);
    $|=1;
    select($old_fh);
    
  2. or download this
    use IO::Socket::INET qw( );
    
    ...
       PeerAddr => $host,
       PeerPort => $port,
    ) or die("Unable to create client socket: $!\n");
    
  3. or download this
    use IO::Socket::INET qw( );
    use Socket           qw( SOMAXCONN );
    ...
       ReuseAddr => 1,
       Listen    => SOMAXCONN,
    ) or die("Unable to create server socket: $!\n");