80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
(define (rmt:connect alldat dbfname dbtype)
(let* ((ulexdat (or (alldat-ulexdat alldat)
(rmt:setup-ulex alldat))))
(ulex:connect ulexdat dbfname dbtype)))
;; setup the remote calls
(define (rmt:setup-ulex alldat)
(let* ((new-ulexdat (ulex:setup))) ;; establish connection to ulex
(alldat-ulexdat-set! alldat new-ulexdat)
(let ((udata (alldat-ulexdat alldat)))
;; register all needed procs
(ulex:register-handler udata 'ping common:get-full-version)
(ulex:register-handler udata 'login common:get-full-version) ;; force setup of the connection
new-ulexdat)))
;; set up a connection to the current owner of the dbfile associated with rid
;; then send the query to that dbfile owner and wait for a response.
;;
(define (rmt:send-receive cmd rid params #!key (attemptnum 1)(area-dat #f)) ;; start attemptnum at 1 so the modulo below works as expected
(let* ((alldat *alldat*)
(areapath (alldat-areapath alldat))
|
|
|
<
|
|
|
|
|
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
(define (rmt:connect alldat dbfname dbtype)
(let* ((ulexdat (or (alldat-ulexdat alldat)
(rmt:setup-ulex alldat))))
(ulex:connect ulexdat dbfname dbtype)))
;; setup the remote calls
(define (rmt:setup-ulex alldat)
(let* ((udata (ulex:setup))) ;; establish connection to ulex
(alldat-ulexdat-set! alldat udata)
;; register all needed procs
(ulex:register-handler udata 'ping common:get-full-version) ;; override ping with get-full-version
(ulex:register-handler udata 'login common:get-full-version) ;; force setup of the connection
udata))
;; set up a connection to the current owner of the dbfile associated with rid
;; then send the query to that dbfile owner and wait for a response.
;;
(define (rmt:send-receive cmd rid params #!key (attemptnum 1)(area-dat #f)) ;; start attemptnum at 1 so the modulo below works as expected
(let* ((alldat *alldat*)
(areapath (alldat-areapath alldat))
|