Teensy 4.1 core updated for C++20
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Client.h 724B

1234567891011121314151617181920212223242526272829
  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