1
This commit is contained in:
parent
1f5efc8eed
commit
1a06b8cc01
14
im/im_base_listener.go
Normal file
14
im/im_base_listener.go
Normal 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
8
im/im_listener.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
package im
|
||||||
|
|
||||||
|
type IMListener interface {
|
||||||
|
|
||||||
|
_IMSocketConnect(msg *IMSocketConnect)
|
||||||
|
_IMSocketDisconnect(msg *IMSocketDisconnect)
|
||||||
|
|
||||||
|
}
|
18
im/im_sender.go
Normal file
18
im/im_sender.go
Normal 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)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user