Create over user stream

I created a thread based on a stateless protocol, think that 2 web servers send very limited requests to each other.

As such, it won’t know if I’ll suddenly dwell on one, since the connection will not be closed, there will simply be no requests. Legally, there may be a gap in the requests, so I do not want to consider them as a lost connection.

What I want to do is send a heartbeat to say “I am alive”, I obviously do not want the heart rate data when I read the flow form, therefore, therefore my question.

How to create a new thread class that wraps another thread and sends heartbeat data without exposing this to code invocation?

+3
source share
1

2 : , . Write , "{Data, 100 bytes, [bytes]}, {Data, 13 bytes, [bytes]}", heartbeat {{Ping, 0 bytes, []} ". Ping.

+1

All Articles