server

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoreServer

type CoreServer struct {
	cpb.UnimplementedGameCoreServer
	// contains filtered or unexported fields
}

CoreServer is derived from Grpc GameCoreServer Interface the required methods are implemented in separated files like room.go, account.go

func NewCoreServer

func NewCoreServer(config *CoreServerConfig) (*CoreServer, error)

NewCoreServer builds a core server

func (*CoreServer) ControlRoom

func (coreServer *CoreServer) ControlRoom(ctx context.Context, req *cpb.ControlRoomArgs) (*cpb.ControlRoomRet, error)

func (*CoreServer) CreateRoom

func (coreServer *CoreServer) CreateRoom(ctx context.Context, req *cpb.CreateRoomArgs) (*cpb.CreateRoomRet, error)

func (*CoreServer) Disconnect

func (coreServer *CoreServer) Disconnect(conn *provider.Conn)

func (*CoreServer) ExitRoom

func (coreServer *CoreServer) ExitRoom(ctx context.Context, req *cpb.ExitRoomArgs) (*cpb.ExitRoomRet, error)

func (*CoreServer) HandleNotifyMsg

func (coreServer *CoreServer) HandleNotifyMsg(conn *provider.Conn, providerMsg *cpb.ProviderMsg, notifyMsg *cpb.NotifyMsgArgs) error

func (*CoreServer) HandleRegisterArgs

func (coreServer *CoreServer) HandleRegisterArgs(conn *provider.Conn, providerMsg *cpb.ProviderMsg, regArgs *cpb.RegisterArgs) error

func (*CoreServer) JoinRoom

func (coreServer *CoreServer) JoinRoom(ctx context.Context, req *cpb.JoinRoomArgs) (*cpb.JoinRoomRet, error)

func (*CoreServer) ListRoom

func (coreServer *CoreServer) ListRoom(ctx context.Context, req *cpb.ListRoomArgs) (*cpb.ListRoomRet, error)

func (*CoreServer) Listen

func (coreServer *CoreServer) Listen(req *cpb.ListenArgs, lisServer cpb.GameCore_ListenServer) error

func (*CoreServer) Login

func (coreServer *CoreServer) Login(ctx context.Context, req *cpb.LoginArgs) (*cpb.LoginRet, error)

func (*CoreServer) NotifyRoomDetails added in v1.1.0

func (coreServer *CoreServer) NotifyRoomDetails(ctx context.Context, room d.Room) error

func (*CoreServer) OperationInRoom

func (coreServer *CoreServer) OperationInRoom(ctx context.Context, req *cpb.OperationInRoomArgs) (*cpb.OperationInRoomRet, error)

func (*CoreServer) Provider

func (coreServer *CoreServer) Provider(pServer cpb.GameCore_ProviderServer) error

func (*CoreServer) QueryRoom

func (coreServer *CoreServer) QueryRoom(ctx context.Context, req *cpb.QueryRoomArgs) (*cpb.QueryRoomRet, error)

type CoreServerConfig

type CoreServerConfig struct {
	MStorage d.Storage
}

CoreServerConfig contains necessary parameters when building core server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL