Differences From Artifact [1caa4a85a3]:
- File server.scm — part of check-in [143fb8134e] at 2023-01-10 13:50:43 on branch v1.80 — Merged earlier change (user: mrwellan, size: 39456) [annotate] [blame] [check-ins using] [more...]
To Artifact [1a43f0a48b]:
- File
server.scm
— part of check-in
[67b18cc991]
at
2023-01-16 10:00:35
on branch v1.80-refactor
— Major refactor/clean up of client connection stuff. Removed old crufty approach of having both client and server side calls in http-transport. Plan would be to eventually get rid of http-transport.
Open files slowly grows. bad argument type in http-transport. Line 285 (close-connection! fullurl) is wrong. (user: matt, size: 39030) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
662 663 664 665 666 667 668 | (tasks:kill-server hostname pid)))) ;; called in megatest.scm, host-port is string hostname:port ;; ;; NOTE: This is NOT called directly from clients as not all transports support a client running ;; in the same process as the server. ;; | | < < < < < < < < < | > | | | | > | < < > | < | < < < > | | | | | | | | | | | | | > > > > > > | | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | (tasks:kill-server hostname pid)))) ;; called in megatest.scm, host-port is string hostname:port ;; ;; NOTE: This is NOT called directly from clients as not all transports support a client running ;; in the same process as the server. ;; (define (server:ping host:port server-id #!key (do-exit #f)) (let* ((host-port (cond ((string? host:port) (let ((slst (string-split host:port ":"))) (if (eq? (length slst) 2) (list (car slst)(string->number (cadr slst))) #f))) (else #f)))) (cond ((and (list? host-port) (eq? (length host-port) 2)) (let* ((myrunremote (make-remote)) (iface (car host-port)) (port (cadr host-port)) (server-dat (client:connect iface port server-id myrunremote)) (login-res (rmt:login-no-auto-client-setup myrunremote))) (if (and (list? login-res) (car login-res)) (begin ;; (print "LOGIN_OK") (if do-exit (exit 0)) #t) (begin ;; (print "LOGIN_FAILED") (if do-exit (exit 1)) #f)))) (else (if host:port (debug:print 0 *default-log-port* "ERROR: bad host:port "host:port)) (if do-exit (exit 1) #f))))) ;; run ping in separate process, safest way in some cases ;; (define (server:ping-server ifaceport) (with-input-from-pipe (conc (common:get-megatest-exe) " -ping " ifaceport) (lambda () |
︙ | ︙ |