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: WizFi250_AP_HelloWorld
Fork of WizFi250Interface by
Revision 12:bb8e979df6df, committed 2015-06-25
- Comitter:
- kaizen
- Date:
- Thu Jun 25 05:16:39 2015 +0000
- Parent:
- 11:e52b91d1a5d5
- Child:
- 13:0b8e51d3c0e8
- Commit message:
- Modified recv_from function of UDP.
Changed in this revision
--- a/Socket/UDPSocket.cpp Wed Jun 24 06:25:56 2015 +0000
+++ b/Socket/UDPSocket.cpp Thu Jun 25 05:16:39 2015 +0000
@@ -39,7 +39,7 @@
int UDPSocket::bind(int port)
{
_port = port;
- _server = true;
+ //_server = true;
return 0;
}
@@ -123,6 +123,14 @@
return -1;
}
}
+ else
+ {
+ if(!_wizfi250->readable(_cid))
+ {
+ return 0;
+ }
+ }
+
tmr.reset();
time = -1;
@@ -136,19 +144,17 @@
}
else
{
- idx += _wizfi250->recv(_cid, &buffer[idx], length - idx);
+ //idx += _wizfi250->recv(_cid, &buffer[idx], length - idx);
+ idx += _wizfi250->recvfrom(_cid, &buffer[idx], length - idx, ip, &port);
}
if (idx == length)
break;
+
time = tmr.read_ms();
}
- if (_server)
- {
- remote.set_address(ip, port);
- }
-
+ remote.set_address(ip, port);
return (idx==0) ? -1 : idx;
}
--- a/WizFi250/WizFi250_msg.cpp Wed Jun 24 06:25:56 2015 +0000 +++ b/WizFi250/WizFi250_msg.cpp Thu Jun 25 05:16:39 2015 +0000 @@ -1,5 +1,5 @@ /* - /* Copyright (C) 2013 gsfan, MIT License +/* Copyright (C) 2013 gsfan, MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without restriction,
--- a/WizFi250/WizFi250_sock.cpp Wed Jun 24 06:25:56 2015 +0000 +++ b/WizFi250/WizFi250_sock.cpp Thu Jun 25 05:16:39 2015 +0000 @@ -1,5 +1,5 @@ /* - /* Copyright (C) 2013 gsfan, MIT License +/* Copyright (C) 2013 gsfan, MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without restriction,
