Logiweb(TM)

7.16.17 tcpQuery

Prev Up Next Page 288 of 800 Search internet


A tcpQuery request sends the query q to domain d port p and waits up to "m \cdot 10 ^ { - e }" seconds for a reply:

eager define tcpQuery ( d , p , m , e , q ) as newline let s :: f = floor ( m , exp10 ( e ) ) in newline let p = make-card ( p ) in newline let s = make-card ( s ) in newline let f = make-card ( f ) in newline let e = make-card ( e ) in newline lgcio ( TcpQuery :: d :: EOS :: p :: s :: f :: e :: q ) end define

The reply has form

<< << r ,, i >> ,, p >>

where p are the bytes received expressed as a singleton list. Even in case of error/timeout, p contains the bytes received. As an example, if the domain d cannot be resolved, p will be the empty list.

Prev Up Next Page 288 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05