in reply to more zero byte madness
I did a simple test script:
..and this executes just fine, no warnings, no errors. Did I mention that there's no client on the other end?#!/usr/local/bin/perl -w use strict; use IO::Socket; my $sock = IO::Socket::INET->new( Proto => 'tcp', LocalPort => 8080, Listen => SOMAXCONN, Reuse => 1 ); my $data = 'Silly test string.'; { local $\ = qq(\0); print $sock $data || die "What happened? $!"; }
If you don't make $socket like this (set your ports and such however):
then it's entirely possible that you never talk to your client properly at all. The fact that it exits as though it sees a null byte may simply be a timeout exit.$inet = IO::Socket::INET->new( Proto => 'tcp', LocalPort => 8080, Listen => SOMAXCONN, Reuse => 1 ); $socket = $inet->accept();
Just a thought -- I'm no socket guru :)
|
|---|