rdavisau/sockets-for-pcl

Keep the TCP connection open and receive the messages continuously

Closed this issue · 1 comments

Hello,

Not sure if it's already there but can I please check if it's possible to keep the connection open and listen for the messages on the connection?

I was thinking if open the connection and keep it open (by not calling close), it will receive the updates. Can you please advise me on this?

Thanks,
Naresh

Yes it's correct in general that a listening socket will keep receiving messages. But depending on the platform you're running on, moving to the background may cause the connection to be broken and in that case you need to follow the application lifecycle events to work around it.