rpcClient

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MulanPSL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mod

func Mod(s string) int64

Mod returns the remainder of s divided by n

func RPCBroadcastRequest added in v1.0.7

func RPCBroadcastRequest(playerID int64, msgCode uint16, protoData protoreflect.ProtoMessage)

RPCBroadcastRequest 调用master

func RPCCall

func RPCCall(nodeName string, playerID int64, msgCode uint16, protoData protoreflect.ProtoMessage)

RPCCall 调用master

func Start

func Start(nodeName string, ip string, port int64)

Start 连接master

Types

type Reference

type Reference struct {
	// contains filtered or unexported fields
}

func (*Reference) Delete

func (r *Reference) Delete(playerID int64)

DeleteTableReference 删除链接引用

func (*Reference) Search

func (r *Reference) Search(playerID int64) service.IChannelContext

SearchTableReference 查询链接引用

func (*Reference) Store

func (r *Reference) Store(playerID int64, reference service.IChannelContext)

StoreTableReference 添加链接引用

type RpcClientService

type RpcClientService struct{}

func NewService

func NewService() *RpcClientService

func (*RpcClientService) RPCCallPush

func (*RpcClientService) RPCCallPush(request service.IServiceRequest, msg *rpc.RPCCallPush) error

func (*RpcClientService) RPCHeartbeatResponse

func (*RpcClientService) RPCHeartbeatResponse(request service.IServiceRequest, msg *rpc.HeartbeatResponse) error

func (*RpcClientService) RPCLoginConflictPush

func (*RpcClientService) RPCLoginConflictPush(request service.IServiceRequest, msg *rpc.LoginConflictPush) error

func (*RpcClientService) RPCLoginResponse

func (*RpcClientService) RPCLoginResponse(request service.IServiceRequest, msg *rpc.LoginResponse) error

func (*RpcClientService) RPCLogoutResponse

func (*RpcClientService) RPCLogoutResponse(request service.IServiceRequest, msg *rpc.LogoutResponse) error

func (*RpcClientService) RouteForRPCCallPush

func (*RpcClientService) RouteForRPCCallPush() (string, uint32)

RouteForRPCCallPush 处理服务器推送的RPC调用

func (*RpcClientService) RouteForRPCHeartbeatResponse

func (*RpcClientService) RouteForRPCHeartbeatResponse() (string, uint32)

RouteForRPCHeartbeatResponse 心跳

func (*RpcClientService) RouteForRPCLoginConflictPush

func (*RpcClientService) RouteForRPCLoginConflictPush() (string, uint32)

RouteForRPCLoginConflictPush 登录冲突

func (*RpcClientService) RouteForRPCLoginResponse

func (*RpcClientService) RouteForRPCLoginResponse() (string, uint32)

RouteForRPCLoginResponse 登录

func (*RpcClientService) RouteForRPCLogoutResponse

func (*RpcClientService) RouteForRPCLogoutResponse() (string, uint32)

RouteForRPCLogoutResponse 登出

Jump to

Keyboard shortcuts

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