Skip to content

Many optimizations for the client side of the library #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a8d66b5
Removed waiting message without DEBUGGING definition
pablorodiz Jun 9, 2016
2beba52
Avoid printing data lines when empty string (for pong)
pablorodiz Jun 9, 2016
366383d
With fast servers first websocket messages can be send in the payload…
pablorodiz Jun 9, 2016
6fe7efb
Add the possibility to include additional headers (mainly for authent…
pablorodiz Jun 9, 2016
f4e5a7d
Added connected() function for the main system be able to check if co…
pablorodiz Jun 9, 2016
2a40189
Some corrections on the sha1 file to allow compilation for both, AVR …
pablorodiz Jun 9, 2016
455b40f
sendEncodedData rewritten to speed up failure in case of socket disco…
pablorodiz Jun 14, 2016
abeeebc
Added getData implementation based on char array instead of String, s…
pablorodiz Jun 20, 2016
f775113
Added public function to disconnect websocket
pablorodiz Jul 1, 2016
1a6838b
Added buffered send method to speed up message send, specially in ESP…
pablorodiz Jul 19, 2016
19948e1
Solved compilation error on last commit
pablorodiz Jul 20, 2016
454b0c4
Fixed capitalization in order to compile in linux environments
Dec 15, 2016
b93f049
Update README.md
pablorodiz Dec 15, 2016
527ef3e
Forced masked message data to contain only valid UTF-8 chars
Dec 27, 2016
695499e
Enabled WS_BUFFERED_SEND also for MKR1000
Dec 29, 2016
729bcee
changed path, host, protocol and headers to internal private variable…
Mar 2, 2017
c84e37f
added some logs when debug output is activated and chnaged AnalyzeReq…
Mar 2, 2017
d56684c
accelerated handshake by using send buffer. Also solved handshake err…
Mar 4, 2017
58cd2c9
Found error on clearing buffer after fast handshake, and added some l…
Mar 6, 2017
eb32a1d
added some login
Mar 8, 2017
7b59aa3
Code adapted to the requirements for working under ESP32-arduino library
Apr 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions MD5.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* These notices must be retained in any copies of any part of this
* documentation and/or software.
*/

#ifndef ESP32
#include "global.h"
#include "MD5.h"

Expand Down Expand Up @@ -300,4 +300,5 @@ void MD5(unsigned char strInputString[], unsigned char md5Digest[], unsigned int

MD5Update(&ctx, strInputString, len);
MD5Final(md5Digest, &ctx);
}
}
#endif
6 changes: 4 additions & 2 deletions MD5.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
* These notices must be retained in any copies of any part of this
* documentation and/or software.
*/

#ifndef MD5_H
#define MD5_H
/* MD5 context. */
typedef struct {
UINT4 state[4]; /* state (ABCD) */
Expand All @@ -32,4 +33,5 @@ void MD5Update (MD5_CTX *, unsigned char *, unsigned int);
void MD5Final (unsigned char [16], MD5_CTX *);

/* Function used by Websockets implementation */
void MD5 (unsigned char [], unsigned char [], unsigned int);
void MD5 (unsigned char [], unsigned char [], unsigned int);
#endif /*MD5_H*/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Inside of the WebSocketServer class there is a compiler directive to turn on sup
Because of limitations of the current Arduino platform (Uno at the time of this writing), this library does not support messages larger than 65535 characters. In addition, this library only supports single-frame text frames. It currently does not recognize continuation frames, binary frames, or ping/pong frames.

### Credits
Thank you to github user ejeklint for the excellent starting point for this library. From his original Hixie76-only code I was able to add support for RFC 6455 and create the WebSocket client.
Thank you to github user ejeklint and brandenhall for the excellent starting point for this library. From ejeklint's original Hixie76-only code brandenhall was able to add support for RFC 6455 and create the WebSocket client. Then I only had to improve stability and speed.

- Branden
- Pablo
Loading