On 11/7/06, Jeff Pang <[EMAIL PROTECTED]> wrote:

>
>use strict;
>use warnings;
>
>use IO::Socket;
>
>my $sock = IO::Socket::INET->new
>    (PeerAddr => 'www.google.com',
>     PeerPort => 7,
>     Proto    => 'tcp') or die "$!";
>
>print $sock "This is a test\n";
>close $sock;
>__END__
>

Hello,your script itself has no problems unless the "\n" would be replaced with 
"\r\n" when it's running on Windows.
Also you can use 'tcpdump' to alalyse the network transition.

Nah, I get incorrect checksums without the \n as well.  This may be an
ethereal-specific problem... I thought it was causing a bug in my
network programming, but I found the real cause.  So this isn't as
critical now... but it is strange.  And it's always the first thing I
wonder about when I run into a bug.  I could try using another sniffer
like tcpdump -- does it check the checksums and tell you if they're
incorrect?

- Jen

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to