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.
Fork of WebSocketClient by
Diff: Websocket.cpp
- Revision:
- 20:ae675d49fa7f
- Parent:
- 19:aa3d163e457e
- Child:
- 21:420b83755885
--- a/Websocket.cpp	Wed May 04 22:08:35 2016 +0000
+++ b/Websocket.cpp	Tue Jun 28 16:22:40 2016 +0000
@@ -4,15 +4,25 @@
 #define MAX_TRY_READ 10
 
 // #define DEBUG
+#define WARNMESSAGES
+#define ERRMESSAGES
 #define INFOMESSAGES
-//Debug is disabled by default
+
 #ifdef DEBUG
-#define DBG(x, ...) pc.printf("[WebSocket : DBG] "x"\r\n", ##__VA_ARGS__); 
+#define DBG(x, ...) pc.printf("[WebSocket : DBG] "x"\r\n", ##__VA_ARGS__);
+#else
+#define DBG(x, ...) 
+#endif
+
+#ifdef WARNMESSAGES
 #define WARN(x, ...) pc.printf("[WebSocket : WARN] "x"\r\n", ##__VA_ARGS__); 
+#else
+#define WARN(x, ...)
+#endif
+
+#ifdef ERRMESSAGES
 #define ERR(x, ...) pc.printf("[WebSocket : ERR] "x"\r\n", ##__VA_ARGS__); 
 #else
-#define DBG(x, ...) 
-#define WARN(x, ...)
 #define ERR(x, ...) 
 #endif
 
    