GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cellnet/processor.go at master · stanjiang/cellnet

Expand file tree

/

processor.go

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
34 lines (24 loc) · 702 Bytes
/

processor.go

Copy path

File metadata and controls

34 lines (24 loc) · 702 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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.