34rtyujk

Fork of WizFi310Interface_Legacy by WIZnet

Revision:
2:4ec2fd843038
Parent:
0:774ff1e8b26b
--- a/WizFi310/WizFi310_sock.cpp	Tue May 02 00:31:36 2017 +0000
+++ b/WizFi310/WizFi310_sock.cpp	Mon Nov 27 05:28:45 2017 +0000
@@ -77,6 +77,8 @@
     _con[cid].protocol = proto;
     _con[cid].type = TYPE_CLIENT;
     _con[cid].func = func;
+    printf("TYPE : %d\n",_con[cid].type);
+
     return cid;
 }
 
@@ -213,9 +215,12 @@
 int WizFi310::readable (int cid)
 {
     if (!isConnected(cid))  return -1;
-
     if(_con[cid].buf == NULL)   return -1;
-    return _con[cid].buf->available();
+    
+int a=_con[cid].buf->available();
+//printf(" return value:%d\n",a);
+ _con[cid].buf->getdata(a);
+return _con[cid].buf->available();
 }
 
 bool WizFi310::isConnected (int cid)
@@ -246,3 +251,6 @@
     *port = _con[cid].port;
     return 0;
 }
+
+
+