IN: temporary
! Unix domain stream sockets
+ : socket-server "unix-domain-socket-test" temp-file ;
+
[
- [
- "unix-domain-socket-test" temp-file delete-file
- ] ignore-errors
+ [ socket-server delete-file ] ignore-errors
- "unix-domain-socket-test" temp-file <local>
+ socket-server <local>
- <server> [
- stdio get accept [
+ ascii <server> [
+ accept [
"Hello world" print flush
readln "XYZ" = "FOO" "BAR" ? print flush
] with-stream
- ] with-stream
+ ] with-disposal
- "unix-domain-socket-test" temp-file delete-file
+ socket-server delete-file
] "Test" spawn drop
yield
[ { "Hello world" "FOO" } ] [
[
- "unix-domain-socket-test" temp-file <local>
- ascii <client> [
- socket-server <local> <client>
++ socket-server <local> ascii <client>
+ [
readln ,
"XYZ" print flush
readln ,
sequences libc shuffle alien.c-types system openal math\r
namespaces threads shuffle opengl arrays ui.gadgets.worlds\r
combinators math.parser ui.gadgets ui.render opengl.gl ui\r
- continuations io.files hints combinators.lib sequences.lib debugger ;\r
+ continuations io.files hints combinators.lib sequences.lib\r
- io.encodings.binary ;\r
++ io.encodings.binary debugger ;\r
\r
IN: ogg.player\r
\r