This commit is contained in:
aozhiwei 2020-08-27 17:24:25 +08:00
parent 1f5efc8eed
commit 1a06b8cc01
3 changed files with 40 additions and 0 deletions

14
im/im_base_listener.go Normal file
View File

@ -0,0 +1,14 @@
package im
type BaseIMListener struct {
}
func (this *BaseIMListener) _IMSocketConnect(msg *IMSocketConnect) {
}
func (this *BaseIMListener) _IMSocketDisconnect(msg *IMSocketDisconnect) {
}

8
im/im_listener.go Normal file
View File

@ -0,0 +1,8 @@
package im
type IMListener interface {
_IMSocketConnect(msg *IMSocketConnect)
_IMSocketDisconnect(msg *IMSocketDisconnect)
}

18
im/im_sender.go Normal file
View File

@ -0,0 +1,18 @@
package im
import "fmt"
type IMSender struct {
}
func (this *IMSender) SendMsg(msgid int16, msg interface{}) {
fmt.Println("IMSender.SendMsg\n")
}
func (this *IMSender) SendIMSocketConnect(msg *IMSocketConnect) {
this.SendMsg(100, msg)
}
func (this *IMSender) SendIMSocketDisconnect(msg *IMSocketDisconnect) {
this.SendMsg(100, msg)
}