Created
January 15, 2014 20:35
-
-
Save benvanstaveren/8444038 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Mojo::IOLoop; | |
my ($ip, $port, $status); | |
Mojo::IOLoop->client({ port => $port, address => $ip } => sub { | |
my ($loop, $error, $stream) = (@_); | |
if(defined($error)) { | |
print 'KO', "\n"; | |
} else { | |
print 'OK', "\n"; | |
} | |
}); | |
Mojo::IOLoop->start unless Mojo::IOLoop->is_running; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment