Megatest

Check-in [f885e8c541]
Login
Overview
Comment:Use ulex-simple to explore using tcp-server egg
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v2.0001
Files: files | file ages | folders
SHA1: f885e8c5417f30e0e342b571f9b44efc48263862
User & Date: matt on 2022-01-10 07:55:57
Other Links: branch diff | manifest | tags
Context
2022-01-10
17:46
Just randomly tried mailbox/mailbox and it seems to be working pretty well. Wierd. check-in: 3d29ed0bb1 user: matt tags: v2.0001
12:45
Try one-shot tcp transport check-in: cbc1276205 user: matt tags: v2.0001-ulex-one-shot
07:55
Use ulex-simple to explore using tcp-server egg check-in: f885e8c541 user: matt tags: v2.0001
06:42
Added support to switch between various methods of handling call loops check-in: 10af298b33 user: matt tags: v2.0001
Changes

Modified ulex-simple/ulex.scm from [496e2d5b2f] to [3fd48eb90f].

265
266
267
268
269
270
271


















272
273
274
275
276
277
278
      (let-values (((inp oup)(tcp-accept serv-listener)))
	(let* ((rdat  (deserialize inp)) ;; '(my-host-port qrykey cmd params)
	       (resp  (ulex-handler uconn rdat)))
	  (if resp (serialize resp oup))
	  (close-input-port inp)
	  (close-output-port oup))
	(loop state)))))



















;; add a proc to the cmd list, these are done symetrically (i.e. in all instances)
;; so that the proc can be dereferenced remotely
;;
(define (set-work-handler uconn proc)
  (udat-work-proc-set! uconn proc))








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
      (let-values (((inp oup)(tcp-accept serv-listener)))
	(let* ((rdat  (deserialize inp)) ;; '(my-host-port qrykey cmd params)
	       (resp  (ulex-handler uconn rdat)))
	  (if resp (serialize resp oup))
	  (close-input-port inp)
	  (close-output-port oup))
	(loop state)))))
;;(define (ulex-cmd-loop uconn)
;;  (let* ((serv-listener (udat-socket uconn))
;;	 ;; (old-listener      (lambda ()
;;	 ;; 		      (let loop ((state 'start))
;;	 ;; 			(let-values (((inp oup)(tcp-accept serv-listener)))
;;	 ;; 			  (let* ((rdat  (deserialize inp)) ;; '(my-host-port qrykey cmd params)
;;	 ;; 				 (resp  (ulex-handler uconn rdat)))
;;	 ;; 			    (if resp (serialize resp oup))
;;	 ;; 			    (close-input-port inp)
;;	 ;; 			    (close-output-port oup))
;;	 ;; 			  (loop state)))))
;;	 (server       (make-tcp-server
;;			serv-listener
;;			(lambda ()
;;			  (let* ((rdat  (deserialize )) ;; '(my-host-port qrykey cmd params)
;;				 (resp  (ulex-handler uconn rdat)))
;;			    (if resp (serialize resp) resp))))))
;;    (server)))

;; add a proc to the cmd list, these are done symetrically (i.e. in all instances)
;; so that the proc can be dereferenced remotely
;;
(define (set-work-handler uconn proc)
  (udat-work-proc-set! uconn proc))

Modified ulex.scm from [f004a2cedd] to [64369b6c76].

16
17
18
19
20
21
22
23
24
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.

;;======================================================================

(declare (unit ulex))

(include "ulex/ulex.scm")
;; (include "ulex-simple/ulex.scm")







|
|
16
17
18
19
20
21
22
23
24
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.

;;======================================================================

(declare (unit ulex))

;; (include "ulex/ulex.scm")
(include "ulex-simple/ulex.scm")