#! /usr/bin/env racket #lang racket (require "layer2.rkt") ;(define verbose? (make-parameter #f)) (define connect-host? (make-parameter null)) (define connect-port? (make-parameter null)) (define greeting (command-line #:once-each ; [("-v") "Verbose mode" (verbose? #t)] [("-c" "--connect") host port "Connect to server " (connect-host? host) (connect-port? (string->number port)) ])) ; Connect (if (or (null? (connect-host?)) (null? (connect-port?))) (display "Using stdin") (let-values ([(cin cout) (tcp-connect (connect-host?) (connect-port?))]) (display (format "Connected to ~s ~s ~n" (connect-host?) (connect-port?))) (current-input-port cin))) ; (layer2-read-ebus-loop (current-input-port))