2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2024-11-22 16:09:49 +00:00

keepalive added

git-svn-id: https://svn.fhem.de/fhem/trunk@2785 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-02-22 17:39:04 +00:00
parent 3a52eb2c87
commit 97c57ffd35

View File

@ -42,11 +42,14 @@ for(;;) {
print "Connect to $ARGV[0] failed";
exit(1);
}
$fd1->setsockopt(SOL_SOCKET, SO_KEEPALIVE, 1);
my $fd2 = IO::Socket::INET->new(PeerAddr=>$ARGV[1]);
if(!$fd2) {
print "Connect to $ARGV[1] failed";
exit(1);
}
$fd2->setsockopt(SOL_SOCKET, SO_KEEPALIVE, 1);
$clients{$fd1}{fd} = $fd1;
$clients{$fd2}{fd} = $fd2;