code: func (ed *Dispatcher) HandleConnectedEvent(e esdispatcher.Event) {
  	evt := e.(*ConnectedEvent)
  
  	logger.Debugf("Handling connected event: %+v", evt)
  
  	if ed.connectionRegistration != nil && ed.connectionRegistration.Eventch != nil {
  		select {
  		case ed.connectionRegistration.Eventch <- NewConnectionEvent(true, nil):
  		default:
  			logger.Warn("Unable to send to connection event channel.")
  		}
  	}
  
  	if ed.peerMonitorPeriod > 0 {
  		ed.peerMonitorDone = make(chan struct{})
  		go ed.monitorPeer(ed.peerMonitorDone)
  	}
  }
docs: // HandleConnectedEvent sends a 'connected' event to any registered listener