cc3000 driver with expanded buffers.
Fork of cc3000_hostdriver_mbedsocket by
Diff: cc3000_server.cpp
- Revision:
- 13:5e36c267e62f
- Parent:
- 0:615c697c33b0
- Child:
- 20:30b6ed7bf8fd
--- a/cc3000_server.cpp Tue Oct 01 21:17:44 2013 +0000 +++ b/cc3000_server.cpp Wed Oct 02 15:00:07 2013 +0000 @@ -56,16 +56,15 @@ socklen_t address_length = sizeof(dest_address); _current_socket = 0; -#if (CC3000_DEBUG == 1) - printf("Waiting for receiving a connection.\n"); -#endif + DBG_HCI("Waiting for receiving a connection"); + while((client_descriptor == -1) || (client_descriptor == -2)) { client_descriptor = _cc3000._socket.accept(_current_socket,&dest_address, &address_length); } -#if (CC3000_DEBUG == 1) - printf("Received.\n"); -#endif + + DBG_HCI("Received"); + _current_socket = client_descriptor; return _current_socket;