258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
(dat (list `(host-port . ,my-host-port)
`(qrykey . qrykey)
`(cmd . ,cmd)
`(params . ,params))))
(cond
(isme (do-work udata dat)) ;; no transmission needed
(else
(handle-exceptions ;; TODO - MAKE THIS EXCEPTION CMD SPECIFIC?
exn
(begin
(print "ULEX send-receive: "cmd", "params", exn="exn)
(message exn))
(begin
;; (mutex-lock! *send-mutex*) ;; DOESN'T SEEM TO HELP
(let-values (((inp oup)(tcp-connect host port)))
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
|
(dat (list `(host-port . ,my-host-port)
`(qrykey . qrykey)
`(cmd . ,cmd)
`(params . ,params))))
(cond
(isme (do-work udata dat)) ;; no transmission needed
(else
(let-values (((inp oup)(tcp-connect host port)))
(let ((res (if (and inp oup)
(begin
(write (obj->string dat) oup)
(close-output-port oup)
(string->obj (read inp)))
(begin
(print "ERROR: send called but no receiver has been setup. Please call setup first!")
#f))))
(close-input-port inp)))
#;(handle-exceptions ;; TODO - MAKE THIS EXCEPTION CMD SPECIFIC?
exn
(begin
(print "ULEX send-receive: "cmd", "params", exn="exn)
(message exn))
(begin
;; (mutex-lock! *send-mutex*) ;; DOESN'T SEEM TO HELP
(let-values (((inp oup)(tcp-connect host port)))
|