io.server with-datagrams fix

release
Slava Pestov 2007-11-12 01:41:27 -05:00
parent a6ef4582c3
commit 9d4db784ee
1 changed files with 3 additions and 2 deletions

5
extra/io/server/server.factor Normal file → Executable file
View File

@ -80,7 +80,8 @@ SYMBOL: log-stream
: datagram-loop ( quot datagram -- )
[
[ receive dup log-datagram >r swap call r> ] keep send
[ receive dup log-datagram >r swap call r> ] keep
pick [ send ] [ 3drop ] keep
] 2keep datagram-loop ; inline
: spawn-datagrams ( quot addrspec -- )
@ -91,4 +92,4 @@ SYMBOL: log-stream
: with-datagrams ( seq service quot -- )
[
[ swap spawn-datagrams ] curry concurrency:parallel-each
] with-logging ; inline
] curry with-logging ; inline