func (s *Station) On(event types.EventName, h types.Handler) {
	switch event {
	case types.Linked:
		s.onLinked = append(s.onLinked, h)
	case types.Blocked:
		s.onBlocked = append(s.onBlocked, h)
	case types.Signal:
		s.onSignal = append(s.onSignal, h)
	case types.Closed:
		s.onClosed = append(s.onClosed, h)
	}
}
// On register Handler for receiving messages
On register Handler for receiving messages
// On register Handler for receiving messages
func (s *Station) On(event types.EventName, h types.Handler) {
	switch event {
	case types.Linked:
		s.onLinked = append(s.onLinked, h)
	case types.Blocked:
		s.onBlocked = append(s.onBlocked, h)
	case types.Signal:
		s.onSignal = append(s.onSignal, h)
	case types.Closed:
		s.onClosed = append(s.onClosed, h)
	}
}
func ( s * Station ) On ( event types . EventName , h types . Handler ) { switch event { case types . Linked : s . onLinked = append ( s . onLinked , h ) case types . Blocked : s . onBlocked = append ( s . onBlocked , h ) case types . Signal : s . onSignal = append ( s . onSignal , h ) case types . Closed : s . onClosed = append ( s . onClosed , h ) } }
On register Handler for receiving messages
On register Handler for receiving messages