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: WNCInterface_M2Xdemo ATT_WNCInterface_Info WNCInterface_HTTP_example Public_IoT_M2X_Cellular_Demo
Fork of M2XStreamClient by
Client.h
- Committer:
- citrusbyte
- Date:
- 2013-11-14
- Revision:
- 7:e64d9e1a800a
- Parent:
- 5:ea68c8980ad8
File content as of revision 7:e64d9e1a800a:
#ifndef Client_h
#define Client_h
#include "TCPSocketConnection.h"
#include "Print.h"
#include "Utility.h"
/*
* TCP Client
*/
class Client : public Print {
public:
Client();
~Client();
virtual int connect(const char *host, uint16_t port);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
virtual int available();
virtual int read();
virtual void flush();
virtual void stop();
virtual uint8_t connected();
private:
virtual int read(uint8_t *buf, size_t size);
uint8_t _buf[1];
uint8_t _len;
TCPSocketConnection _sock;
};
#endif
