Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
intersting socket example
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Saurabh Hirani  
View profile  
 More options May 4 2009, 11:42 am
From: Saurabh Hirani <saurabh.hir...@gmail.com>
Date: Mon, 4 May 2009 08:42:51 -0700 (PDT)
Local: Mon, May 4 2009 11:42 am
Subject: intersting socket example
The output is interesting:

use strict;
use IO::Socket;
my $client = new IO::Socket::INET(
                                  PeerAddr => 'any non existent IP',
                                  PeerPort => any port no,
                                  Proto    => 'udp'
                                 );
(!$client) && die "failed to create sock: $!";
my ($request, $response);
$request = 'the request to rule the world';
while(1 == 1) {
    if (! defined($client->send($request))) {
        print "send failed: $!\n";
    } else {
        print "send succeeded\n";
    }
    sleep 3;

}

For the ppl using Linux,

Can you make this program print:

"send succeeded" all the time without changing anything in the code?
You are free to make changes in the OS.

regards,
Sauarbh.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google