Documentation
¶
Overview ¶
Package zmodem carries files over a terminal's own byte stream with ZMODEM, as rz and sz on the other end expect: Find spots a transfer the other end started in what it prints, Receive takes the files sz sends, Send gives rz the files it waits for. It draws nothing; the caller asks the user and shows how it goes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Receive ¶
Receive takes the files the other end (sz) sends, into sink. It returns what the shell printed after the transfer: the caller shows it.
Types ¶
type Offer ¶
type Offer struct {
// Upload says the other end runs rz and waits for files, which we
// send: it sent ZRINIT. Otherwise it runs sz and sends us files: it
// sent ZRQINIT.
Upload bool
}
Offer is a transfer the other end started.
type Options ¶
type Options struct {
// EscapeControl escapes every control character both ways, for a
// line that would not carry them as they are (Telnet, serial).
EscapeControl bool
// Progress is told how the files go; nil for nothing.
Progress xfer.Progress
// Timeout is how long to wait for the other end before asking again;
// 0 is 10 seconds.
Timeout time.Duration
}
Options are how a transfer goes.