Documentation ¶
Overview ¶
简单的事件派发类,支持线程安全,注意:不能嵌套监听和派发事件
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
func (*Dispatcher) Dispatch ¶
func (this *Dispatcher) Dispatch(eventtype string, args interface{})
派发自定义类型事件,附带一个参数
func (*Dispatcher) ListenOnce ¶
func (this *Dispatcher) ListenOnce(eventtype string, hander Handler)
监听一次指定类型事件, 接受完事件移除监听
func (*Dispatcher) RemoveAll ¶
func (this *Dispatcher) RemoveAll()
Click to show internal directories.
Click to hide internal directories.