Re: [racket-dev] Implementation question

2014-05-02 Thread nicolas carraggi
+ It's still test-code but it's working fine now, maybe the timout time is too small but now it works well! Greetings,Nicolas Subject: Re: [racket-dev] Implementation question From: matth...@ccs.neu.edu Date: Sat, 19 Apr 2014 09:25:27 -0400 CC: nicocarra...@hotmail.com; dev@racket-l

Re: [racket-dev] Implementation question

2014-04-20 Thread Matthias Felleisen
rver is running. Pong is the answer from the server running on my laptop. > > > (multicast-ping "192.168.1.100" 8080 0 200) > 192.168.1.0:8080 NOO > 192.168.1.105:8080 NOO > 192.168.1.108:8080 pong > --- > Multicast finished! >

Re: [racket-dev] Implementation question

2014-04-19 Thread Matthias Felleisen
Let me recommend events instead: #lang racket ;; Nat -> Void ;; wait for t seconds before connecting to google.com, then stop (define (do-work t) (thread (lambda () (with-handlers ((exn:fail:network? (lambda (x) (displayln (exn-message x) (sleep t) (define-values (

Re: [racket-dev] Implementation question

2014-04-19 Thread Laurent
One simpler possibility is to use `tcp-connect/enable-break` and run a timer in parallel to break it after a shorter delay. For example: (define-values (in out) (values #f #f)) (define connect-thread (thread (λ()(set!-values (in out) (tcp-connect "www.google.com" 80)

[racket-dev] Implementation question

2014-04-19 Thread nicolas carraggi
Hello, I am actually using "Racket/tcp" for a project in Racket.I'm creating a peer-to-peer network but now I encountered a small problem.For a multicast I want to connect with each server on the same network. For this I use "tcp-connect", but when i try to connect to an ip address which is not