Handbook
Glossary
send-websocket-bytes ( bytes mask? opcode final? -- )
Vocabulary
http
.
websockets
Inputs
bytes
an
object
mask?
an
object
opcode
an
object
final?
an
object
Outputs
None
Definition
USING:
accessors
crypto.xor
io
kernel
math
namespaces
random
;
IN:
http.websockets
:
send-websocket-bytes
( bytes mask? opcode final? -- )
output-stream
get
disposed>>
[
4drop
]
[
128 0
?
bitor
write1
[
[
get-write-payload-length
[
128
bitor
]
dip
[
write1
]
[
[
write
]
when*
]
bi*
]
[
4
random-bytes
[
write
drop
]
[
xor-crypt
[
write
]
when*
]
2bi
]
bi
]
[
[
get-write-payload-length
[
write1
]
[
[
write
]
when*
]
bi*
]
[
[
write
]
when*
]
bi
]
if
flush
]
if
;