MCPcopy Create free account
hub / github.com/drosoCode/atvremote / read

Method read

pkg/v1/command/command.go:45–55  ·  view source on GitHub ↗

read data from the android tv device

()

Source from the content-addressed store, hash-verified

43
44// read data from the android tv device
45func (c *Command) read() ([]byte, error) {
46 len, err := c.Connection.Read(c.Buffer)
47 if err != nil {
48 return nil, err
49 }
50 if len < 5 {
51 return c.read()
52 }
53
54 return c.Buffer[0:len], nil
55}
56
57// send a configuration message to the android tv device
58// this message must be sent before each command

Callers 1

sendConfigurationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected