rupi valid? - part-cw/lambdanative GitHub Wiki
(rupi-valid? rc)
rupi-valid tests if a rupi-client connection is valid, e.g. not refused by server of timed out.
Parameter | Description |
---|---|
rc | Rupi client to check |
Example
Example 1: Example of a login procedure, that tries to login twice and then fails.
(let* ((rc (rupi-client 0 rupi:key rupi:addr rupi:port))
(login (store-ref store "Key"))
(success2 (rupi-cmd rc "LOGIN" login (number->string (system-buildepoch)) (host-name)))
(success (if (rupi-valid? rc) success2
(rupi-cmd rc "LOGIN" login (number->string (system-buildepoch)) (host-name))
)))
(if success
(begin (display "success") #t)
#f
))