Groups
Conversations
All groups and messages
Send feedback to Google
Help
Training
Sign in
Groups
netkiller
Conversations
About
Perl use IO::Select; use IO::Socket;
3 views
Skip to first unread message
netkiller
unread,
Sep 29, 2008, 8:48:40 AM
9/29/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to netkiller
use IO::Select;
use IO::Socket;
$lsn = new IO::Socket::INET(Listen => 1, LocalPort => 8080);
$sel = new IO::Select( $lsn );
while(@ready = $sel->can_read) {
foreach $fh (@ready) {
if($fh == $lsn) {
# Create a new socket
$new = $lsn->accept;
$sel->add($new);
}
else {
# Process socket
# Maybe we have finished with the socket
$sel->remove($fh);
$fh->close;
}
}
}
Reply all
Reply to author
Forward
0 new messages