File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 2323 (set! machine-list (cons (machine addr ports protocols) machine-list));add-machine-alive addr)
2424 "No connection detected " )))))
2525 (define (dispatch message)
26- ;(define machine-list '())
2726 (set! machine-list (map (lambda (open-ip) (machine open-ip ports protocols)) target-machine-ips))
2827 (cond ((eq? (car message) 'up ) target-machine-ips)
2928 ((eq? (car message) 'machines ) machine-list )
4645;#t
4746;>
4847
49-
48+ (define (all-tports)
49+ (for-each (lambda (machine-dispatch) (printf "IP:\n~a\nOpen ports:\n~s\n\n " (machine-dispatch '(ip)) (machine-dispatch '(tports)) )) machine-list))
5050(define (check-tports port)
5151 (map (lambda (machine-dispatch) (if (machine-dispatch (list 'tport port)) (machine-dispatch '(ip)) " " )) machine-list))
5252
8383 (define (check-tport port)
8484 (if (memq (string->number port) open-tcp) #t #f ))
8585 (define (probe-tcp ip port)
86- (display "MAKING THREAD " )
8786 (thread (lambda () (with-handlers ([exn:fail? (lambda (exn) exn )])
8887 (if
8988 (let-values (((input output) (tcp-connect ip port))) (list input output))
You can’t perform that action at this time.
0 commit comments