|
definition: |
cpnsAlive :: String -> IO Bool
cpnsAlive host = catch tryPingCPNS (\_ -> return False)
where
tryPingCPNS = do
h <- connectToSocket host cpnsSocket
hPutStrLn h (show Ping)
hFlush h
answer <- hWaitForInput h cpnsTimeOut
hClose h
return answer
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
Tests whether the CPNS demon at a host is alive, i.e., reacts on `Ping` message. |
|
failfree: |
_ |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_) |-> _}
|
|
name: |
cpnsAlive |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
String -> Prelude.IO Prelude.Bool |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |