In the STOMP docs, v1.2, I cannot find how a heartbeat message should look like. When logging the incoming traffic I can see lots of line feeds \n.
Is the heartbeat message the line feed then?
Regarding the heart-beats themselves, any new data received over the network connection is an indication that the remote end is alive. In a given direction, if heart-beats are expected every milliseconds:
From the spec the heart-beat is rather vague but in most implementations the heart-beat is the linefeed or '\n' character because that value will not be mistaken for a new incoming frame.