From 977335378247e8c7df0594fc300cb82c4ce6bbc7 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 8 Sep 2012 19:24:10 +0200 Subject: Racket: new option to specify network interface for REPL server In geiser-racket.sh, there's the new option -n, which uses a new hostname argument accepted by geiser/user's start-geiser function. --- scheme/racket/geiser/user.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scheme') diff --git a/scheme/racket/geiser/user.rkt b/scheme/racket/geiser/user.rkt index e9540b0..f383a46 100644 --- a/scheme/racket/geiser/user.rkt +++ b/scheme/racket/geiser/user.rkt @@ -110,18 +110,18 @@ (define server-channel (make-channel)) -(define (run-geiser-server port enforce-module-constants) +(define (run-geiser-server port enforce-module-constants (hostname #f)) (run-server port (lambda (in out) (run-geiser-repl in out enforce-module-constants)) #f void (lambda (p _ __) - (let ([lsner (tcp-listen p)]) + (let ([lsner (tcp-listen p 4 #f hostname)]) (let-values ([(_ p __ ___) (tcp-addresses lsner #t)]) (channel-put server-channel p) lsner))))) -(define (start-geiser (port 0) (enforce-module-constants #f)) - (thread (lambda () (run-geiser-server port enforce-module-constants))) +(define (start-geiser (port 0) (hostname #f) (enforce-module-constants #f)) + (thread (lambda () (run-geiser-server port enforce-module-constants hostname))) (channel-get server-channel)) -- cgit v1.2.3