You are reading a single comment by @JumJum and its replies. Click here to read the full conversation.
  • @sameh.hady, may be we can share our experience. Base is the same, since my knowledge of C is poor. May be waiting for somebody adding a server to Espruino, as suggested by @Gordon, would be a better way. But at least I learned a lot around datahandling with sockets ;-)
    I've found an SHA1 implementation and added it to my testing environment around Espruino on ESP8266. You can find my actual source here:

    • http://jumspruino.jumware.com/sources/ESP8266Test.js, see function startSocket and SHA-functions.
    • http://jumspruino.jumware.com/sources/WebSocket.htm
      This is far away from being perfect, but it includes SHA1 and decoding/encoding for socket frame. Its tested in my environment with firefox and chrome. For connection I use the http-module from Espruino, which makes it easy to handle headers.
      Todo list, please have in mind, very early status:
    • keep connection alive
    • socket frame for data > 200 bytes
    • problem with IE, which sends uppercase chars in upgrade header.
    • testing, testing, testing
    • .....
About

Avatar for JumJum @JumJum started