Megatest

Check-in [652f6c9323]
Login
Overview
Comment:wip
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.70-captain-ulex | v1.70-defunct-try
Files: files | file ages | folders
SHA1: 652f6c9323c0f1381d6a94d7c43df9fbbb510c49
User & Date: mrwellan on 2020-01-08 14:41:14
Other Links: branch diff | manifest | tags
Context
2020-01-09
13:09
Additional tweaks for chicken 5. Needs sparse-vectors added check-in: 3fcfe6ba94 user: jmoon18 tags: v1.70-refactor02-chicken5, v1.70-defunct-try
2020-01-08
18:24
wip check-in: 37d4c849bc user: mrwellan tags: v1.70-captain-ulex, v1.70-defunct-try
14:41
wip check-in: 652f6c9323 user: mrwellan tags: v1.70-captain-ulex, v1.70-defunct-try
13:32
wip check-in: 1f4e895d45 user: mrwellan tags: v1.70-captain-ulex, v1.70-defunct-try
Changes

Modified ulex/ulex.scm from [9af81f0275] to [9d27b5b698].

67
68
69
70
71
72
73

74

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
	  (udat-captain-port-set!    udata port)
	  (udat-captain-pid-set!     udata pid)
	  (if (ping udata (conc ipaddr ":" port))
	      udata
	      (begin
		(remove-captain-pkt udata captn)
		(setup))))

	(setup-as-captain udata)) ;; this saves the thread to captain-thread and starts the thread

    ))

;; connect to a specific dbfile
(define (connect udata dbfname dbtype)
  udata)

(define (ping udata host-port)
  (let ((cookie (make-cookie udata)))
    (send udata host-port 'ping "just pinging" (current-seconds))
    ;; (mailbox-rec
    ))

;;======================================================================
;; network utilities
;;======================================================================








>
|
>








|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	  (udat-captain-port-set!    udata port)
	  (udat-captain-pid-set!     udata pid)
	  (if (ping udata (conc ipaddr ":" port))
	      udata
	      (begin
		(remove-captain-pkt udata captn)
		(setup))))
	(begin
	  (setup-as-captain udata)  ;; this saves the thread to captain-thread and starts the thread
	  (setup)))
    ))

;; connect to a specific dbfile
(define (connect udata dbfname dbtype)
  udata)

(define (ping udata host-port)
  (let ((cookie (make-cookie udata)))
    (send udata host-port 'ping "just pinging" (conc (current-seconds)))
    ;; (mailbox-rec
    ))

;;======================================================================
;; network utilities
;;======================================================================

426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
		  (send udata host:port "version" qrykey val)))
	       ((rucaptain)
		(send udata host:port "iamcaptain" qrykey (if (udat-my-cpkt-key udata)
							      "yes"
							      "no")))
	       (else
		;; (send-ack udata host:port qrykey)
		(add-to-work-queue udata (get-peer-dat udata host:port) handlerkey qrykey data)))
	     (else (print "BAD DATA? handler=" handlerkey " data=" data)))))
	(loop state)))))

;; add a proc to the handler list
(define (register-handler udata key proc)
  (hash-table-set! (udat-handlers udata) key proc))









|
|







428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
		  (send udata host:port "version" qrykey val)))
	       ((rucaptain)
		(send udata host:port "iamcaptain" qrykey (if (udat-my-cpkt-key udata)
							      "yes"
							      "no")))
	       (else
		;; (send-ack udata host:port qrykey)
		(add-to-work-queue udata (get-peer-dat udata host:port) handlerkey qrykey data))))
	    (else (print "BAD DATA? controldat=" controldat " data=" data))))
	(loop state)))))

;; add a proc to the handler list
(define (register-handler udata key proc)
  (hash-table-set! (udat-handlers udata) key proc))