Ticket #568: server.scm
File server.scm, 443 bytes (added by , 12 years ago) |
---|
Line | |
---|---|
1 | (use tcp posix) |
2 | |
3 | (define l (tcp-listen 1234)) |
4 | |
5 | (define-values (in out) (tcp-accept l)) |
6 | |
7 | (display "0" out) |
8 | (printf "I just wrote ~S\n" "0") |
9 | (flush-output out) |
10 | (sleep 2) |
11 | (display "\r\n" out) |
12 | (printf "I just wrote ~S\n" "\r\n") |
13 | (flush-output) |
14 | (flush-output out) |
15 | (sleep 2) |
16 | (display "0\r" out) |
17 | (printf "I just wrote ~S\n" "0\r") |
18 | (flush-output) |
19 | (flush-output out) |
20 | (sleep 2) |
21 | (display "\n" out) |
22 | (printf "I just wrote ~S\n" "\n") |
23 | |
24 | (print "DONE") |
25 | (exit) |