File tree Expand file tree Collapse file tree 5 files changed +2
-15
lines changed
hardware/arduino/cores/arduino Expand file tree Collapse file tree 5 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ class Client : public Stream {
10
10
virtual int connect (IPAddress ip, uint16_t port) =0;
11
11
virtual int connect (const char *host, uint16_t port) =0;
12
12
virtual size_t write (uint8_t ) =0;
13
- virtual size_t write (const char *str) =0;
14
13
virtual size_t write (const uint8_t *buf, size_t size) =0;
15
14
virtual int available () = 0;
16
15
virtual int read () = 0;
Original file line number Diff line number Diff line change 29
29
30
30
// Public Methods //////////////////////////////////////////////////////////////
31
31
32
- /* default implementation: may be overridden */
33
- size_t Print::write (const char *str)
34
- {
35
- size_t n = 0 ;
36
- while (*str) {
37
- n += write (*str++);
38
- }
39
- return n;
40
- }
41
-
42
32
/* default implementation: may be overridden */
43
33
size_t Print::write (const uint8_t *buffer, size_t size)
44
34
{
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class Print
46
46
void clearWriteError () { setWriteError (0 ); }
47
47
48
48
virtual size_t write (uint8_t ) = 0;
49
- virtual size_t write (const char *str);
49
+ size_t write (const char *str) { return write (( const uint8_t *)str, strlen (str)); }
50
50
virtual size_t write (const uint8_t *buffer, size_t size);
51
51
52
52
size_t print (const __FlashStringHelper *);
Original file line number Diff line number Diff line change 1
1
#ifndef server_h
2
2
#define server_h
3
3
4
- class Server {
4
+ class Server : public Print {
5
5
public:
6
6
virtual void begin () =0;
7
7
};
Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ class UDP : public Stream {
57
57
virtual int endPacket () =0;
58
58
// Write a single byte into the packet
59
59
virtual size_t write (uint8_t ) =0;
60
- // Write a string of characters into the packet
61
- virtual size_t write (const char *str) =0;
62
60
// Write size bytes from buffer into the packet
63
61
virtual size_t write (const uint8_t *buffer, size_t size) =0;
64
62
You can’t perform that action at this time.
0 commit comments