115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
(define *db-access-mutex* (make-mutex))
(define *db-cache-path* #f)
;; SERVER
(define *my-client-signature* #f)
(define *transport-type* #f) ;; override with [server] transport http|rpc|nmsg
(define (common:set-transport-type)
(set! *transport-type*
(string->symbol
(or
(args:get-arg "-transport")
(configf:lookup *configdat* "server" "transport")
"rpc")))
*transport-type*)
(define *runremote* #f) ;; if set up for server communication this will hold <host port>
(define *max-cache-size* 0)
(define *logged-in-clients* (make-hash-table))
(define *server-id* #f)
(define *server-info* #f)
|
>
|
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
(define *db-access-mutex* (make-mutex))
(define *db-cache-path* #f)
;; SERVER
(define *my-client-signature* #f)
(define *transport-type* #f) ;; override with [server] transport http|rpc|nmsg
(define *DEFAULT-TRANSPORT* "http")
(define (common:set-transport-type)
(set! *transport-type*
(string->symbol
(or
(args:get-arg "-transport")
(configf:lookup *configdat* "server" "transport")
*DEFAULT-TRANSPORT*)))
*transport-type*)
(define *runremote* #f) ;; if set up for server communication this will hold <host port>
(define *max-cache-size* 0)
(define *logged-in-clients* (make-hash-table))
(define *server-id* #f)
(define *server-info* #f)
|
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
|
(debug:print 4 *default-log-port* " ... done")
)
"clean exit")))
;; let's try to clean up open sockets
(if *runremote*
(case (remote-transport *runremote*)
((http) (close-all-connections!))
((rpc) (rpc:close-all-connections!))
(else
(debug:print-info 0 *default-log-port* "Transport "(remote-transport *runremote*)" not supported"))))
(thread-start! th1)
(thread-start! th2)
(thread-join! th1))))
|
|
|
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
|
(debug:print 4 *default-log-port* " ... done")
)
"clean exit")))
;; let's try to clean up open sockets
(if *runremote*
(case (remote-transport *runremote*)
((http) #t)
((rpc) (rpc:close-all-connections!))
(else
(debug:print-info 0 *default-log-port* "Transport "(remote-transport *runremote*)" not supported"))))
(thread-start! th1)
(thread-start! th2)
(thread-join! th1))))
|