Lucas Rey has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use IO::Socket; my $sock1; sub OpenSocket{ $sock1 = new IO::Socket::INET( PeerAddr => '192.168.10.7', PeerPort => 8000, Proto => 'tcp'); $sock1 or die "no socket :$!"; } ################ START SCRIPT ################# OpenSocket(); $str="Something to send"; while (1) { $sock1->send($str); } close($sock1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Check connection state prior to send data
by BrowserUk (Patriarch) on Sep 24, 2016 at 07:04 UTC | |
by Lucas Rey (Sexton) on Sep 24, 2016 at 07:30 UTC | |
by BrowserUk (Patriarch) on Sep 24, 2016 at 07:34 UTC | |
by Lucas Rey (Sexton) on Sep 24, 2016 at 07:57 UTC | |
by Corion (Patriarch) on Sep 24, 2016 at 08:07 UTC | |
| |
by BrowserUk (Patriarch) on Sep 24, 2016 at 08:29 UTC | |
| |
|
Re: Check connection state prior to send data
by Lucas Rey (Sexton) on Sep 26, 2016 at 06:02 UTC | |
by BrowserUk (Patriarch) on Sep 26, 2016 at 07:51 UTC | |
by Lucas Rey (Sexton) on Sep 26, 2016 at 08:02 UTC |