Documentation ¶
Index ¶
- type MockClient
- func (this *MockClient) OnAccountRes(res *pb.AccountRes)
- func (this *MockClient) OnCoinRes(res *pb.CoinRes)
- func (this *MockClient) OnCreatePlayerRes(res *pb.CreatePlayerRes)
- func (this *MockClient) OnErrorRes(res *pb.ErrorRes)
- func (this *MockClient) OnGuildCreateRes(res *pb.GuildCreateRes)
- func (this *MockClient) OnGuildDataViewRes(res *pb.GuildDataViewRes)
- func (this *MockClient) OnGuildJoinReqTip(res *pb.GuildJoinReqTip)
- func (this *MockClient) OnGuildJoinRes(res *pb.GuildJoinRes)
- func (this *MockClient) OnGuildListRes(res *pb.GuildListRes)
- func (this *MockClient) OnInputCmd(cmd string)
- func (this *MockClient) OnLoginRes(res *pb.LoginRes)
- func (this *MockClient) OnPlayerEntryGameRes(res *pb.PlayerEntryGameRes)
- type MockClientHandler
- type TestClient
- func (this *TestClient) Exit()
- func (this *TestClient) Init(ctx context.Context, useGate bool, useWebsocket bool, serverAddr string, ...) bool
- func (this *TestClient) OnInputCmd(cmd string)
- func (this *TestClient) OnUpdate(ctx context.Context, updateCount int64)
- func (this *TestClient) Run(ctx context.Context)
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) 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) 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)
Click to show internal directories.
Click to hide internal directories.