This PR fixes JavaScript connection to ensure hearbeats are scheduled even if the write completes asynchronously.
It also reworks how the connection checks if the transceiver write call consumed the completed buffer. There is no need for a callback or separate parameter as the transceiver advances the buffer and the call can check if there is any remaining data.
This PR fixes JavaScript connection to ensure hearbeats are scheduled even if the write completes asynchronously.
It also reworks how the connection checks if the transceiver write call consumed the completed buffer. There is no need for a callback or separate parameter as the transceiver advances the buffer and the call can check if there is any remaining data.