Overview
Comment: | Ulex setup works |
---|---|
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: |
a24928bf83e8d55361d6b89861a8a870 |
User & Date: | matt on 2020-01-15 21:14:59 |
Other Links: | branch diff | manifest | tags |
Context
2020-01-18
| ||
21:55 | Added placeholder for whoowns check-in: 407a60fccd user: matt tags: v1.70-captain-ulex, v1.70-defunct-try | |
2020-01-15
| ||
21:14 | Ulex setup works check-in: a24928bf83 user: matt tags: v1.70-captain-ulex, v1.70-defunct-try | |
2020-01-14
| ||
22:43 | wip check-in: e858e4927e user: matt tags: v1.70-captain-ulex, v1.70-defunct-try | |
Changes
Modified ulex/ulex.scm from [aa4f6bc6b4] to [4622e1fcb8].
︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | + + | ;; find or become the captain ;; setup and return a ulex object ;; (define (setup) (let* ((udata (make-udat)) (cpkts (get-all-captain-pkts udata)) ;; read captain pkts (captn (get-winning-pkt cpkts))) ;; check to see if our own server is started and start one if not (if (not (udat-serv-listener udata))(start-server-find-port udata)) (if captn (let* ((port (alist-ref 'port captn)) (host (alist-ref 'host captn)) (ipaddr (alist-ref 'ipaddr captn)) (pid (alist-ref 'pid captn)) (Z (alist-ref 'Z captn))) (udat-captain-address-set! udata ipaddr) |
︙ | |||
80 81 82 83 84 85 86 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - + | ;; connect to a specific dbfile (define (connect udata dbfname dbtype) udata) (define (ping udata host-port) (let* ((cookie (make-cookie udata)) |
︙ | |||
339 340 341 342 343 344 345 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | + + + - + + - - + + + - - - - + + + + + + + + + + + + | (values (peer-inp pdat)(peer-oup pdat)) (values #f #f)))) ;; send structured data to recipient ;; ;; NOTE: qrykey is what was called the "cookie" previously ;; ;; retval tells send to expect and wait for return data (one line) and return it or time out ;; this is for ping where we don't want to necessarily have set up our own server yet. ;; |
︙ | |||
422 423 424 425 426 427 428 | 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | - - + + - + - - + - + + + + + - + - - + + | (let loop ((state 'start)) (let-values (((inp oup)(tcp-accept serv-listener))) (print "got here: inp=" inp " oup=" oup) (let* ((controldat (read-line inp)) (data (read-line inp))) (print "controldat: " controldat " data: " data) (match (string-split controldat) |
︙ |