Overview
Comment: | wip |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.6584-ck5 |
Files: | files | file ages | folders |
SHA1: |
4fdbc16a0c7a5f39f4d2256b0b5db5c3 |
User & Date: | matt on 2021-05-14 06:02:37 |
Other Links: | branch diff | manifest | tags |
Context
2021-05-14
| ||
06:30 | Basic communication and server starting working. check-in: eec8d1d26e user: matt tags: v1.6584-ck5 | |
06:02 | wip check-in: 4fdbc16a0c user: matt tags: v1.6584-ck5 | |
2021-05-13
| ||
23:46 | wip check-in: febc25a845 user: matt tags: v1.6584-ck5 | |
Changes
Added fullrununit.sh version [9bd1a1d378].
|
Modified http-transportmod.scm from [eede86b1be] to [8ac0292156].
︙ | |||
124 125 126 127 128 129 130 131 132 133 134 135 136 137 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | + + + + + | ;; NOTE: http-transport:launch is the entry point ;; -> http-transport:run ;; -> http-transport:try-start-server -> http-transport:try-start-server (until success) (define (http-get-function fnkey) (hash-table-ref/default *http-functions* fnkey (lambda () "nothing here yet"))) (define (http-handle-api dbstruct $) (if (api-proc) ((api-proc) dbstruct $) ;; ($) => alist 'no-api-proc-set)) (define (http-transport:run hostn) ;; Configurations for server (tcp-buffer-size 2048) (max-connections 2048) (debug:print 2 *default-log-port* "Attempting to start the server ...") (let* ((db #f) ;; (open-db)) ;; we don't want the server to be opening and closing the db unnecesarily |
︙ | |||
159 160 161 162 163 164 165 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | - + - + | ;; Setup the web server and a /ctrl interface ;; (vhost-map `(((* any) . ,(lambda (continue) ;; open the db on the first call ;; This is were we set up the database connections (let* (($ (request-vars source: 'both)) |
︙ | |||
493 494 495 496 497 498 499 | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 | - + | (define (loop-test host port data) ;; server-address is host:port ;; ping the server and ask it ;; if it ready ;; (let* ((sdat (servdat-init #f host port #f))) ;; (http-transport:send-receive sdat "abc" 'ping '()))) (let* ((payload (sexpr->string data)) (res (with-input-from-request |
︙ |
Modified rmtmod.scm from [7173063106] to [b2d8ebc2ad].
︙ | |||
270 271 272 273 274 275 276 | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | - + + - + + | (define (rmt:send-receive-real remote apath dbname rid cmd params) (let* ((conn (rmt:get-connection remote apath dbname))) (assert conn "FATAL: Unable to connect to db "apath"/"dbname) (let* (;; (host (rmt:conn-ipaddr conn)) ;; (port (rmt:conn-port conn)) (payload (sexpr->string params)) (res (with-input-from-request |
︙ |
Modified tests/unittests/basicserver.scm from [9df3f5b6e7] to [3c2174c06a].
︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | + + + - + + + + + | ;; ./rununittest.sh server 1;(cd simplerun;megatest -stop-server 0) (import rmtmod trace http-transportmod http-client apimod dbmod) (trace-call-sites #t) (trace ;; db:get-dbdat ;; rmt:find-main-server rmt:send-receive-real sexpr->string ) (test #f #t (rmt:remote? (let ((r (make-rmt:remote))) (set! *rmt:remote* r) r))) (test #f #f (rmt:get-connection *rmt:remote* *toppath* ".db/main.db")) (test #f #f (rmt:find-main-server *toppath* ".db/main.db")) (test #f #t (rmt:open-main-connection *rmt:remote* *toppath*)) (pp (hash-table->alist (rmt:remote-conns *rmt:remote*))) (test #f #t (rmt:conn? (rmt:get-connection *rmt:remote* *toppath* ".db/main.db"))) (define *main* (rmt:get-connection *rmt:remote* *toppath* ".db/main.db")) (for-each (lambda (tdat) |
︙ |