28 lines
317 B
Go
28 lines
317 B
Go
|
package notify
|
||
|
|
||
|
import (
|
||
|
"net"
|
||
|
|
||
|
"git.loafle.net/commons_go/rpc/notify"
|
||
|
)
|
||
|
|
||
|
func NotifyInit(conn net.Conn) {
|
||
|
Notifier = New()
|
||
|
Notifier.Start(conn)
|
||
|
}
|
||
|
|
||
|
func NotifyDestroy() {
|
||
|
Notifier.Close()
|
||
|
}
|
||
|
|
||
|
var Notifier notify.Notifier
|
||
|
|
||
|
func New() notify.Notifier {
|
||
|
|
||
|
nh := NewNotifyHandler()
|
||
|
|
||
|
n := notify.New(nh)
|
||
|
|
||
|
return n
|
||
|
}
|