Handbook
Glossary
clients ( n -- )
Vocabulary
benchmark
.
sockets
Inputs
n
an
object
Outputs
None
Definition
USING:
accessors
concurrency.count-downs
concurrency.promises
io
io.encodings.ascii
io.sockets
kernel
math
namespaces
prettyprint
threads
tools.time
;
IN:
benchmark.sockets
:
clients
( n -- )
dup
pprint
" clients: "
write
[
<promise>
server-promise
set
dup
<count-down>
counter
set
"127.0.0.1"
0
<inet4>
ascii
<server>
[
server
set
]
[
addr>>
port>>
port
set
]
bi
[
simple-server
]
"Simple server"
spawn
drop
[
yield
[
simple-client
]
"Simple client"
spawn
drop
]
times
counter
get
await
stop-server
server-promise
get
?promise
drop
]
benchmark
.
flush
;