Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: ThingPlug_Ethernet_Example
Fork of GMMP_mbed by
Client.h
00001 #ifndef Client_h 00002 #define Client_h 00003 00004 #include "TCPSocketConnection.h" 00005 00006 #include "Print.h" 00007 #include "Utility.h" 00008 00009 /* 00010 * TCP Client 00011 */ 00012 class Client : public Print { 00013 public: 00014 Client(); 00015 ~Client(); 00016 00017 virtual int connect(const char *host, uint16_t port); 00018 virtual size_t write(uint8_t); 00019 //virtual size_t write(const uint8_t *buf, size_t size); 00020 virtual size_t write(char *buf, size_t size); //lesmin 00021 virtual int available(); 00022 virtual int read(); 00023 virtual void flush(); 00024 virtual void stop(); 00025 virtual uint8_t connected(); 00026 private: 00027 virtual int read(uint8_t *buf, size_t size); 00028 uint8_t _buf[1]; 00029 uint8_t _len; 00030 TCPSocketConnection _sock; 00031 }; 00032 00033 #endif
Generated on Tue Jul 12 2022 21:35:52 by
