udp-echo.rkt

This commit is contained in:
Tony Garnock-Jones 2017-09-29 17:23:07 +01:00
parent 0599f974b9
commit d96477b9db
1 changed files with 7 additions and 0 deletions

View File

@ -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))))