Support Forums

Is it possible to use Websocket with the new background-functions?

I would like to use something like this little tokenChallenge, is this possible with the new background-functions or are there some limitations that prevents from using it?

I wouldn’t imagine websockets wouldnt work alone since they last 15 minutes. Guessing here but you’d need something persistent to manage the connections.

For a chat app maybe you could maybe use a db table to persist the connection identifiers then spin up a function for each: connect, disconnect, send the message.