GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — cellnet/processor.go at master · stanjiang/cellnet Expand file tree/ Copy pathprocessor.goMore file actions 34 lines (24 loc) · 702 Bytes / Copy pathprocessor.goFile metadata and controls34 lines (24 loc) · 702 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 package cellnet // 事件 type Event interface { // 事件对应的会话 Session() Session // 事件携带的消息 Message() interface{} } // 消息收发器 type MessageTransmitter interface { // 接收消息 OnRecvMessage(ses Session) (msg interface{}, err error) // 发送消息 OnSendMessage(ses Session, msg interface{}) error } // 处理钩子(参数输入, 返回输出, 不给MessageProccessor处理时,可以将Event设置为nil) type EventHooker interface { // 入站(接收)的事件处理 OnInboundEvent(input Event) (output Event) // 出站(发送)的事件处理 OnOutboundEvent(input Event) (output Event) } // 用户端处理 type EventCallback func(ev Event) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |