Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

MP3 server with IO::Socket

by perlmonkey (Hermit)
on Apr 23, 2000 at 12:56 UTC ( #8650=perltutorial: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #create the listen socket
    my $listen_socket = IO::Socket::INET->new(LocalPort => 8000,
                                              Listen => 10,
                                              Proto => 'tcp',
                                              Reuse => 1);
    
  2. or download this
    #write to the client socket
    print $connection "Hello Client!";
    
    #read from the client socket
    my $message = <$connection>;
    
  3. or download this
    #set the sig handler for when a child dies 
    $SIG{CHLD} = \&REAPER;
    
    ...
        #reset the sig for the next child to die;
        $SIG{CHLD} = \&REAPER;
    }
    
  4. or download this
    $SIG{CHLD} = 'IGNORE';
  5. or download this
    #!/usr/bin/perl -w
    use strict;
    use IO::Socket;
    ...
            }
        }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perltutorial [id://8650]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2015-07-28 01:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls