code: func (e *eventEmitter) emit(typ EventType, data interface{}) {
  	ev := Event{Type: typ, Packet: data}
  
  	e.lock.Lock()
  	lists := [][]EventHandler{}
  	if handlers, ok := e.listeners[ev.Type]; ok {
  		lists = append(lists, handlers)
  	}
  	if handlers, ok := e.once[ev.Type]; ok {
  		lists = append(lists, handlers)
  		delete(e.once, ev.Type)
  	}
  	e.lock.Unlock()
  
  	for _, list := range lists {
  		for _, handler := range list {
  			go handler(ev)
  		}
  	}
  }
docs: // Triggers an event to be sent out to listeners.