Documentation
¶
Index ¶
- type MahjongServer
- func (s *MahjongServer) CreateRoom(ctx context.Context, in *pb.CreateRoomRequest) (*pb.CreateRoomReply, error)
- func (s *MahjongServer) JoinRoom(ctx context.Context, in *pb.JoinRoomRequest) (*pb.JoinRoomReply, error)
- func (s *MahjongServer) LeaveRoom(c *client) error
- func (s *MahjongServer) Login(ctx context.Context, in *pb.LoginRequest) (*pb.LoginReply, error)
- func (s *MahjongServer) Logout(ctx context.Context, in *pb.Empty) (*pb.LogoutReply, error)
- func (s *MahjongServer) Ping(ctx context.Context, in *pb.Empty) (*pb.Empty, error)
- func (s *MahjongServer) Ready(stream pb.Mahjong_ReadyServer) error
- func (s *MahjongServer) RefreshRoom(ctx context.Context, in *pb.RefreshRoomRequest) (*pb.RefreshRoomReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MahjongServer ¶
type MahjongServer struct { pb.UnimplementedMahjongServer // contains filtered or unexported fields }
func NewMahjongServer ¶
func NewMahjongServer(maxClients int) *MahjongServer
func (*MahjongServer) CreateRoom ¶
func (s *MahjongServer) CreateRoom(ctx context.Context, in *pb.CreateRoomRequest) (*pb.CreateRoomReply, error)
func (*MahjongServer) JoinRoom ¶
func (s *MahjongServer) JoinRoom(ctx context.Context, in *pb.JoinRoomRequest) (*pb.JoinRoomReply, error)
func (*MahjongServer) LeaveRoom ¶
func (s *MahjongServer) LeaveRoom(c *client) error
LeaveRoom detect when client disconnects or leaves room
func (*MahjongServer) Login ¶
func (s *MahjongServer) Login(ctx context.Context, in *pb.LoginRequest) (*pb.LoginReply, error)
func (*MahjongServer) Logout ¶
func (s *MahjongServer) Logout(ctx context.Context, in *pb.Empty) (*pb.LogoutReply, error)
func (*MahjongServer) Ready ¶
func (s *MahjongServer) Ready(stream pb.Mahjong_ReadyServer) error
func (*MahjongServer) RefreshRoom ¶
func (s *MahjongServer) RefreshRoom(ctx context.Context, in *pb.RefreshRoomRequest) (*pb.RefreshRoomReply, error)
Click to show internal directories.
Click to hide internal directories.