//onConnOpen(){
// this.log("transport", `connected to ${this.endPointURL()}`, this.transport.prototype)
// this.flushSendBuffer()
// this.reconnectTimer.reset()
// if(!this.conn.skipHeartbeat){
// clearInterval(this.heartbeatTimer)
// this.heartbeatTimer = setInterval(() => this.sendHeartbeat(), this.heartbeatIntervalMs)
// }
// this.stateChangeCallbacks.open.forEach( callback => callback() )
//}
internal void OnConnOpen(object sender, EventArgs e)
{
Log("transport", $"connected to { EndpointUrl() }"); //FIX phoenix js doesnt need to build EndpointUrl more than once - added cache
FlushSendBuffer(); //jfis - send anythign buffered when conn opens
_reconnectTimer.Reset(); //jfis - stop bothering to try reconnecting
//skipHeartbeat only for longpoll
_heartbeatTimer.Stop(); //jfis - not sure this stop is necessary. can conn be opened while heartbeat enabled?
_heartbeatTimer.Start(); //jfis - connected now so begin sending heartbeats
foreach (var cb in _openCallbacks)
{
cb();
}
}