PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

30 rindas
724B

  1. #if ARDUINO >= 100
  2. #ifndef client_h
  3. #define client_h
  4. #include "Print.h"
  5. #include "Stream.h"
  6. #include "IPAddress.h"
  7. class Client : public Stream {
  8. public:
  9. virtual int connect(IPAddress ip, uint16_t port) =0;
  10. virtual int connect(const char *host, uint16_t port) =0;
  11. virtual size_t write(uint8_t) =0;
  12. virtual size_t write(const uint8_t *buf, size_t size) =0;
  13. virtual int available() = 0;
  14. virtual int read() = 0;
  15. virtual int read(uint8_t *buf, size_t size) = 0;
  16. virtual int peek() = 0;
  17. virtual void flush() = 0;
  18. virtual void stop() = 0;
  19. virtual uint8_t connected() = 0;
  20. virtual operator bool() = 0;
  21. protected:
  22. uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); };
  23. };
  24. #endif
  25. #endif