Add client core, handshake pending frames, and in-memory Conn tests

This commit is contained in:
robert
2026-01-04 20:39:38 +00:00
parent 786533bbfc
commit ac2d1887a9
5 changed files with 405 additions and 30 deletions

View File

@@ -100,33 +100,3 @@ var _ = Describe("Handshaker", func() {
})
})
func sdk_test_new_inmem_conn() *sdk_test_inmem_conn {
return &sdk_test_inmem_conn{
write_ch: make(chan string, 16),
read_ch: make(chan string, 16),
}
}
type sdk_test_inmem_conn struct {
write_ch chan string
read_ch chan string
}
func (c *sdk_test_inmem_conn) WriteText(ctx context.Context, s string) error {
select {
case c.write_ch <- s:
return nil
case <-ctx.Done():
return ctx.Err()
}
}
func (c *sdk_test_inmem_conn) ReadText(ctx context.Context) (string, error) {
select {
case s := <-c.read_ch:
return s, nil
case <-ctx.Done():
return "", ctx.Err()
}
}