class

LocalSend::Client

Inherits Reference < Object

Sends one or more files to a LocalSend device.

#send waits for the receiver to accept and for every upload to finish. Run it in a fiber when the caller must stay responsive.

Constants

ACCEPT_TIMEOUT = 5.minutes

The receiver holds prepare-upload while someone decides.

Log = LocalSend::Log.for("client")
TRANSFER_TIMEOUT = 60.seconds

Constructors

new(identity : Identity, port : Int32 = DEFAULT_PORT)
Source

Instance methods

build_request(paths : Enumerable(Path)) : Protocol::PrepareUploadRequest

Builds the prepare-upload payload without opening a connection.

Source
send(device : Device, path : Path, pin : String | Nil = nil, &report : Progress -> ) : Nil
Source
send(device : Device, path : Path, pin : String | Nil = nil) : Nil
Source
send(device : Device, paths : Enumerable(Path), pin : String | Nil = nil) : Nil
Source
send(device : Device, paths : Enumerable(Path), pin : String | Nil = nil, &report : Progress -> ) : Nil
Source