Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add DialContext and EnrollContext for Client #543

Merged
merged 8 commits into from
Mar 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func (ev *clientEvents) OnBoot(e Engine) Action {
}

func (ev *clientEvents) OnOpen(c Conn) ([]byte, Action) {
panjf2000 marked this conversation as resolved.
Show resolved Hide resolved
_ = c
panjf2000 marked this conversation as resolved.
Show resolved Hide resolved
return nil, None
}

Expand Down Expand Up @@ -272,7 +273,7 @@ func (s *testClientServer) OnTick() (delay time.Duration, action Action) {
if i%2 == 0 {
netConn = true
}
go startGnetClient(s.tester, s.client, s.clientEV, s.network, s.addr, s.multicore, s.async, netConn)
panjf2000 marked this conversation as resolved.
Show resolved Hide resolved
go startGnetClient(s.tester, s.client, s.network, s.addr, s.multicore, s.async, netConn)
}
}
if s.network == "udp" && atomic.LoadInt32(&s.clientActive) == 0 {
Expand Down Expand Up @@ -319,7 +320,7 @@ func testServeWithGnetClient(t *testing.T, network, addr string, reuseport, reus
assert.NoError(t, err)
}

func startGnetClient(t *testing.T, cli *Client, ev *clientEvents, network, addr string, multicore, async, netDial bool) {
func startGnetClient(t *testing.T, cli *Client, network, addr string, multicore, async, netDial bool) {
rand.Seed(time.Now().UnixNano())
var (
c Conn
Expand Down