A fork of the original interface for OS/2. Features a correctly-implemented recv (but retains the old behavior via recv2).

Dependencies:   BufferedSerial

Dependents:   weather_clock weather_clock

Files at this revision

API Documentation at this revision

Comitter:
mbedAustin
Date:
Thu May 07 04:00:27 2015 +0000
Parent:
42:3f62103a4f3c
Commit message:
added warning about sending messages > 2048 bytes

Changed in this revision

ESP8266/ESP8266.cpp Show annotated file Show diff for this revision Revisions of this file
Socket/TCPSocketConnection.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/ESP8266/ESP8266.cpp	Thu May 07 03:51:02 2015 +0000
+++ b/ESP8266/ESP8266.cpp	Thu May 07 04:00:27 2015 +0000
@@ -327,6 +327,9 @@
 int ESP8266::send(const char * buf, int len)
 {
     //TODO: need to add handler for data > 2048B, this is the max packet size of the ESP8266.
+    if(len >= 2048){
+        WARN("send buffer >= 2048B, need to chunk this up to be less.");    
+    }
     const char* bufptr=buf;
     for(int i=0; i<len; i++) {
         putc((int)*bufptr++);
--- a/Socket/TCPSocketConnection.cpp	Thu May 07 03:51:02 2015 +0000
+++ b/Socket/TCPSocketConnection.cpp	Thu May 07 04:00:27 2015 +0000
@@ -217,6 +217,7 @@
 // -1 if unsuccessful, else number of bytes received
 int TCPSocketConnection::receive_all(char* data, int length)
 {
+    ERR("receive_all() not yet implimented");
     //  if ((_sock_fd < 0) || !_is_connected)
 //        return -1;
 //