reverted HTTPCLient debug back to defaulted off
Fork of MTS-Socket by
Diff: Socket.h
- Revision:
- 1:096f484f3ae6
- Parent:
- 0:eef30dbe1130
- Child:
- 2:ebc6129de4e8
--- a/Socket.h Thu May 15 22:02:08 2014 +0000 +++ b/Socket.h Mon May 19 12:36:11 2014 -0500 @@ -1,4 +1,35 @@ -#ifndef SOCKET_H -#define SOCKET_H - -#endif \ No newline at end of file +#ifndef SOCKET_H +#define SOCKET_H + +#include "mbed.h" +#include "IPStack.h" + +/** Socket file descriptor and select wrapper + */ +class Socket { +public: + /** Socket + */ + Socket(); + + /** Set blocking or non-blocking mode of the socket and a timeout on + blocking socket operations + \param blocking true for blocking mode, false for non-blocking mode. + \param timeout timeout in ms [Default: (1500)ms]. + */ + void set_blocking(bool blocking, unsigned int timeout=1500); + + /** Close the socket file descriptor + */ + int close(); + + ~Socket(); + +protected: + bool _blocking; + int _timeout; + IPStack * ip; +}; + + +#endif /* SOCKET_H_ */