Browse Source

udp-echo.rkt

pr/32
Tony Garnock-Jones 4 years ago
parent
commit
d96477b9db
  1. 7
      racket/syndicate/examples/actor/udp-echo.rkt

7
racket/syndicate/examples/actor/udp-echo.rkt

@ -0,0 +1,7 @@
#lang syndicate
(require/activate syndicate/drivers/udp)
(spawn (on (message (udp-packet $peer (udp-listener 5999) $body))
(printf "Received from ~a: ~v\n" peer body)
(send! (udp-packet (udp-listener 5999) peer body))))
Loading…
Cancel
Save