Closed
Description
Greetings!
I am trying to work out a disconnection issue I am having. Almost all of your responses involve enabling debug and pointing to this link:
https://github.com/Links2004/arduinoWebSockets/blob/master/src/WebSockets.h#L40
I think enabling debug mode should involve making the WebSockets.h file look something like this:
#include <Arduino.h>
#define DEBUG_WEBSOCKETS(...) os_printf( __VA_ARGS__ )
#ifndef DEBUG_WEBSOCKETS
#define DEBUG_WEBSOCKETS(...)
#define NODEBUG_WEBSOCKETS
#endif
...
Unfortunately when I do this, my sketch fails to compile resulting in the following error message:
In file included from /home/michaelphipps/arduino-1.6.7/libraries/arduinoWebSockets-master/src/WebSocketsServer.cpp:25:0:
/home/michaelphipps/arduino-1.6.7/libraries/arduinoWebSockets-master/src/WebSocketsServer.cpp: In member function 'void WebSocketsServer::handleHeader(WSclient_t*, String*)':
/home/michaelphipps/arduino-1.6.7/libraries/arduinoWebSockets-master/src/WebSockets.h:30:54: error: cannot pass objects of non-trivially-copyable type 'class String' through '...'
#define DEBUG_WEBSOCKETS(...) os_printf( __VA_ARGS__ )
^
/home/michaelphipps/arduino-1.6.7/libraries/arduinoWebSockets-master/src/WebSocketsServer.cpp:630:9: note: in expansion of macro 'DEBUG_WEBSOCKETS'
DEBUG_WEBSOCKETS("[WS-Server][%d][handleHeader] - base64Authorization: %s\n", client->num, client->base64Authorization);
^
exit status 1
Error compiling.
I should note have also tried
#define DEBUG_WEBSOCKETS(...) Serial.printf( __VA_ARGS__ )
with no luck.
What's going wrong?
Metadata
Metadata
Assignees
Labels
No labels