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.
Fork of HTTPClient by
Revision 23:9386b15b0820, committed 2014-02-05
- Comitter:
- vwochnik
- Date:
- Wed Feb 05 16:21:39 2014 +0000
- Parent:
- 22:967c00d70d95
- Commit message:
- fix
Changed in this revision
HTTPClient.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/HTTPClient.cpp Sun Feb 02 16:40:08 2014 +0000 +++ b/HTTPClient.cpp Wed Feb 05 16:21:39 2014 +0000 @@ -18,7 +18,7 @@ */ //Debug is disabled by default -#if 1 +#if 0 //Enable debug #include <cstdio> #define DBG(x, ...) std::printf("[HTTPClient : DBG]"x"\r\n", ##__VA_ARGS__); @@ -120,6 +120,7 @@ HTTPResult HTTPClient::connect(const char* url, HTTP_METH method, IHTTPDataOut* pDataOut, IHTTPDataIn* pDataIn, int timeout) //Execute request { +puts("Connect called."); m_httpResponseCode = 0; //Invalidate code m_timeout = timeout; @@ -517,7 +518,7 @@ if(readLen < minLen) { DBG("Trying to read at most %d bytes [Blocking]", minLen - readLen); - m_sock.set_blocking(false, m_timeout); + m_sock.set_blocking(true, m_timeout); ret = m_sock.receive_all(buf + readLen, minLen - readLen); } else @@ -574,7 +575,7 @@ return HTTP_CLOSED; //Connection was closed by server } - m_sock.set_blocking(false, m_timeout); + m_sock.set_blocking(true, m_timeout); int ret = m_sock.send_all(buf, len); if(ret > 0) {