testclient

package
v0.0.0-...-826b796 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

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

模拟客户端

func (*MockClient) OnAccountRes

func (this *MockClient) OnAccountRes(res *pb.AccountRes)

func (*MockClient) OnCoinRes

func (this *MockClient) OnCoinRes(res *pb.CoinRes)

func (*MockClient) OnCreatePlayerRes

func (this *MockClient) OnCreatePlayerRes(res *pb.CreatePlayerRes)

func (*MockClient) OnErrorRes

func (this *MockClient) OnErrorRes(res *pb.ErrorRes)

func (*MockClient) OnGuildCreateRes

func (this *MockClient) OnGuildCreateRes(res *pb.GuildCreateRes)

func (*MockClient) OnGuildDataViewRes

func (this *MockClient) OnGuildDataViewRes(res *pb.GuildDataViewRes)

func (*MockClient) OnGuildJoinReqTip

func (this *MockClient) OnGuildJoinReqTip(res *pb.GuildJoinReqTip)

func (*MockClient) OnGuildJoinRes

func (this *MockClient) OnGuildJoinRes(res *pb.GuildJoinRes)

func (*MockClient) OnGuildListRes

func (this *MockClient) OnGuildListRes(res *pb.GuildListRes)

func (*MockClient) OnInputCmd

func (this *MockClient) OnInputCmd(cmd string)

测试命令

func (*MockClient) OnLoginRes

func (this *MockClient) OnLoginRes(res *pb.LoginRes)

func (*MockClient) OnPlayerEntryGameRes

func (this *MockClient) OnPlayerEntryGameRes(res *pb.PlayerEntryGameRes)

type MockClientHandler

type MockClientHandler struct {
	DefaultConnectionHandler
	// contains filtered or unexported fields
}

func NewMockClientHandler

func NewMockClientHandler(protoCodec Codec) *MockClientHandler

func (*MockClientHandler) OnRecvPacket

func (this *MockClientHandler) OnRecvPacket(connection Connection, packet Packet)

type TestClient

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

客户端测试 可以管理多个模拟的客户端

func (*TestClient) Exit

func (this *TestClient) Exit()

func (*TestClient) Init

func (this *TestClient) Init(ctx context.Context, useGate bool, useWebsocket bool, serverAddr string,
	mockClientAccountPrefix string, mockClientNum int, mockClientBeginId int) bool

func (*TestClient) OnInputCmd

func (this *TestClient) OnInputCmd(cmd string)

func (*TestClient) OnUpdate

func (this *TestClient) OnUpdate(ctx context.Context, updateCount int64)

func (*TestClient) Run

func (this *TestClient) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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