[Denver-pm] OT: Java network connection test?
Larry Leszczynski
larryl at emailplus.org
Tue Jun 30 16:22:38 PDT 2015
On Tue, Jun 30, 2015, at 04:35 PM, Robert L. Harris wrote:
> I'm trying to solve a side issue at work on an Android. Just started
> learning Java since there's no Perl to effectively just do a small
> network connection to test if a service is available.
How about something like:
-----------------------------
use IO::Socket::INET;
my $socket = new IO::Socket::INET (
PeerHost => '127.0.0.1',
PeerPort => '5000',
Proto => 'tcp',
) or die "ERROR in Socket Creation : $!\n";
print "TCP Connection Success.\n";
-----------------------------
More information about the Denver-pm
mailing list