ws update

This commit is contained in:
Gordon
2023-03-23 14:18:33 +08:00
parent be3c866dc0
commit 889e6b0d84
3 changed files with 6 additions and 14 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ import (
)
func (s *Server) InitServer(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
s.notification = notification.NewCheck(client)
s.LongConnServer.SetMessageHandler(notification.NewCheck(client))
msggateway.RegisterMsgGatewayServer(server, s)
return nil
}
@@ -42,8 +42,8 @@ func (s *Server) Notification() *notification.Check {
return s.notification
}
func NewServer(rpcPort int) *Server {
return &Server{rpcPort: rpcPort, pushTerminal: []int{constant.IOSPlatformID, constant.AndroidPlatformID}}
func NewServer(rpcPort int, longConnServer LongConnServer) *Server {
return &Server{rpcPort: rpcPort, LongConnServer: longConnServer, pushTerminal: []int{constant.IOSPlatformID, constant.AndroidPlatformID}}
}
func (s *Server) OnlinePushMsg(context context.Context, req *msggateway.OnlinePushMsgReq) (*msggateway.OnlinePushMsgResp, error) {