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: X_NUCLEO_IDW01M1_AP_Test
Fork of X_NUCLEO_IDW01M1 by
Revision 9:d2dfbf8e7f49, committed 2016-05-13
- Comitter:
- mridup
- Date:
- Fri May 13 06:59:56 2016 +0000
- Parent:
- 8:0f302a13e21b
- Child:
- 10:e97284ae55f1
- Commit message:
- reducing recv() delay to 1ms
Changed in this revision
| SPWFInterface.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Spwf_API/SpwfSADevice.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SPWFInterface.cpp Thu May 12 07:36:13 2016 +0000
+++ b/SPWFInterface.cpp Fri May 13 06:59:56 2016 +0000
@@ -161,19 +161,6 @@
return err;
}
-/** Accepts a connection on a TCP socket
- *
- * The server socket must be bound and set to listen for connections.
- * On a new connection, creates a network socket using the specified
- * socket instance.
- *
- * By default, accept blocks until data is sent. If socket is set to
- * non-blocking or times out, NSAPI_ERROR_WOULD_BLOCK is returned
- * immediately.
- *
- * @param socket TCPSocket instance that will handle the incoming connection.
- * @return 0 on success, negative error code on failure
- */
int SpwfSAInterface::socket_accept(void **handle, void *server)
{
struct spwf_socket *server_socket = (struct spwf_socket *)server;
--- a/Spwf_API/SpwfSADevice.cpp Thu May 12 07:36:13 2016 +0000
+++ b/Spwf_API/SpwfSADevice.cpp Fri May 13 06:59:56 2016 +0000
@@ -238,13 +238,13 @@
wait_for_socket_data = true;
recv_timer.stop();
recv_timer.reset();
- wait_ms(10);
+ wait_ms(1);
if(bytes_read == 0) //<bytes_to_read??
return -1;//return error if no bytes are read!
else
return bytes_read;//return amount of data arrived so far
}
- wait_ms(10); //CHECK:TODO: Need to wait to allow other IRQ's to run in case of non-blocking call?
+ wait_ms(1); //CHECK:TODO: Need to wait to allow other IRQ's to run in case of non-blocking call?
return -1;
}
