Skip to content

Keep connection alive #206

Closed Answered by jjmaldonis
Fernando473 asked this question in General help
Jun 12, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Hey @Fernando473, instead of replacing self.socket, you want to send a message to that existing socket/connection.

So you can run self.socket.send({"type": "KeepAlive"}) every 5-10 seconds to keep the connection open. When you're ready to close the connection, you can run self.socket.send({"type": "CloseStream"}).

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@nikolawhallon
Comment options

Comment options

You must be logged in to vote
1 reply
@jjmaldonis
Comment options

Answer selected by jpvajda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants