3 ; demo server for non-blocking UDP communications
5 ; start this program then start the client udp-client.lsp
7 ; note, that net-listen in UDP mode only binds the socket
8 ; to the local address, it does not 'listen' as in TCP/IP
11 (set 'socket
(net-listen 10001 "localhost" "udp"))
12 (if socket
(println "server listening on port " 10001)
13 (println (net-error)))
14 (while (not (net-error))
15 (set 'msg
(net-receive-from socket
255))
17 (net-send-to (nth 1 msg
) (nth 2 msg
) (upper-case (first msg
)) socket
))