ArduinoWebsocketClient icon indicating copy to clipboard operation
ArduinoWebsocketClient copied to clipboard

Fixes for 32 bit boards

Open PaulStoffregen opened this issue 7 years ago • 1 comments

These simple changes allow for compatibility with most 32 bit boards.

In the string table, pointers need to be read with pgm_read_ptr(), since pgm_read_word() is fixed at 16 bits.

In monitor(), on systems where char is unsigned the "endReached" condition can never be true. The simple solution is to use "int" which matches the return type of _client.read() and convert to char as needed.

The example also needs to use String() to properly print the result.

I know this is a very old library that's probably not maintained anymore, but hopefully these simple changes will help anyone trying to use modern 32 bit boards.

PaulStoffregen avatar Jul 19 '18 12:07 PaulStoffregen

https://github.com/hadleyrich/ArduinoWebsocketClient has added the headers for Sec-Websocket-Key. Tested with a Node server

SvenDS avatar Jul 30 '18 13:07 SvenDS