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:
- 11:85bff70bab45
- Parent:
- 10:fc40c56e8a3c
- Child:
- 12:0979caf96fa6
--- a/Websocket.cpp Wed Mar 30 09:05:44 2016 +0000 +++ b/Websocket.cpp Wed Mar 30 10:40:05 2016 +0000 @@ -4,7 +4,7 @@ #define MAX_TRY_READ 10 //Debug is disabled by default -#if 1 +#if 0 #define DBG(x, ...) std::printf("[WebSocket : DBG]"x"\r\n", ##__VA_ARGS__); #define WARN(x, ...) std::printf("[WebSocket : WARN]"x"\r\n", ##__VA_ARGS__); #define ERR(x, ...) std::printf("[WebSocket : ERR]"x"\r\n", ##__VA_ARGS__); @@ -21,6 +21,15 @@ socket.set_blocking(false, 400); } +Websocket::Websocket() { + +} + +void Websocket::Initialize(char * url){ + fillFields(url); + socket.set_blocking(false, 400); +} + void Websocket::fillFields(char * url) { int ret = parseURL(url, scheme, sizeof(scheme), host, sizeof(host), &port, path, sizeof(path)); if(ret)