Handbook
Glossary
tftp-get ( filename encoding server -- bytes )
Vocabulary
tftp
Inputs
filename
an
object
encoding
an
object
server
an
object
Outputs
bytes
an
object
Definition
USING:
arrays
destructors
endian
io.sockets
kernel
math
pack
sequences
sequences.extras
;
IN:
tftp
:
tftp-get
( filename encoding server -- bytes )
'[
TFTP-RRQ
_
_
3array
"Saa"
pack-be
_
get-tftp-host
f
0
<inet4>
<datagram>
&dispose
[
send
]
keep
dup
'[
_
receive
[
4
cut
swap
2
cut
nip
be>
TFTP-ACK
swap
2array
"SS"
pack-be
]
dip
_
send
dup
length
511
>
]
loop>array*
concat
]
with-destructors
;