Long polling?

Posted on
  • (didn't see any reference to this from searching, so...)
    Is anyone using long polling to a middleware service to get around nat issues? is long polling effective with espruino? how long can the espurino hang on the connection without getting an answer before it gives up? (or does it give up at all?)

    I know it has sockets, which is good news... my guess is it can hang for a while. I'd be able to test and get answers for myself, but I'm a little eager and the Espruino Wifi was just ordered today thus in transit :)

  • I believe long polling should work fine - I don't think there is a timeout for receiving data, that'd be up to the user.

    Another option is to use a websocket connection?

  • Was just about to suggest WebSockets as a possibility. There's an Espruino WebSocket module.

  • it's to long-poll as the client, so sounds like it'll all be fine. long-poll can be more handy than websockets as depending on what your server is, you can add the long-poll on a server that's being used for other things (rather than a dedicated process that sits on its own port, etc).

    for sure excited to get this gadget...

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Long polling?

Posted by Avatar for Arron @Arron