21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
-
+
|
;; ABOUT:
;; See README in the distribution at https://www.kiatoa.com/fossils/ulex
;; NOTES:
;; Why sql-de-lite and not say, dbi? - performance mostly, then simplicity.
;;
;;======================================================================
;; (use rpc pkts mailbox sqlite3)
(use mailbox)
(module ulex
*
(import scheme posix chicken data-structures ports extras files mailbox)
(import srfi-18 pkts matchable regex
typed-records srfi-69 srfi-1
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
-
-
-
+
+
+
|
))
;; 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
(let* ((cookie (make-cookie udata))
(res (send-receive udata host-port 'ping "just pinging" (conc (current-seconds)))))
(print "got res=" res)
))
;;======================================================================
;; network utilities
;;======================================================================
(define (rate-ip ipaddr)
|