(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...
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem