Documentation ¶
Index ¶
- func New(c *conf.RPCServer, s *comet.Server) *grpc.Server
- type CometGrpcServer
- type Server
- func (s *Server) Broadcast(ctx context.Context, req *pb.BroadcastReq) (*pb.BroadcastReply, error)
- func (s *Server) BroadcastRoom(ctx context.Context, req *pb.BroadcastRoomReq) (*pb.BroadcastRoomReply, error)
- func (s *Server) Close(ctx context.Context, req *pb.Empty) (*pb.Empty, error)
- func (s *Server) Ping(ctx context.Context, req *pb.Empty) (*pb.Empty, error)
- func (s *Server) PushMsg(ctx context.Context, req *pb.PushMsgReq) (reply *pb.PushMsgReply, err error)
- func (s *Server) Rooms(ctx context.Context, req *pb.RoomsReq) (*pb.RoomsReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CometGrpcServer ¶
type CometGrpcServer = Server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Broadcast ¶
func (s *Server) Broadcast(ctx context.Context, req *pb.BroadcastReq) (*pb.BroadcastReply, error)
Broadcast broadcast msg to all user.
func (*Server) BroadcastRoom ¶
func (s *Server) BroadcastRoom(ctx context.Context, req *pb.BroadcastRoomReq) (*pb.BroadcastRoomReply, error)
BroadcastRoom broadcast msg to specified room.
func (*Server) PushMsg ¶
func (s *Server) PushMsg(ctx context.Context, req *pb.PushMsgReq) (reply *pb.PushMsgReply, err error)
PushMsg push a message to specified sub keys.
Click to show internal directories.
Click to hide internal directories.