mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
YunServer: added write() method
This commit is contained in:
parent
34885b019b
commit
46a1cf6f06
@ -46,3 +46,9 @@ YunClient YunServer::accept() {
|
|||||||
return YunClient(res[0]);
|
return YunClient(res[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t YunServer::write(uint8_t c) {
|
||||||
|
uint8_t cmd[] = { 'b', c };
|
||||||
|
bridge.transfer(cmd, 2);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
void begin();
|
void begin();
|
||||||
YunClient accept();
|
YunClient accept();
|
||||||
|
|
||||||
virtual size_t write(uint8_t c) { /* TODO */ }
|
virtual size_t write(uint8_t c);
|
||||||
|
|
||||||
void listenOnLocalhost() { useLocalhost = true; }
|
void listenOnLocalhost() { useLocalhost = true; }
|
||||||
void noListenOnLocalhost() { useLocalhost = false; }
|
void noListenOnLocalhost() { useLocalhost = false; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user