type Connector … type TCPServer … // NewTCPServer returns a new test server listening on local tcp port and // serving incoming jsonrpc2 streams using the provided stream server. It // panics on any error. func NewTCPServer(ctx context.Context, server jsonrpc2.StreamServer, framer jsonrpc2.Framer) *TCPServer { … } // Connect dials the test server and returns a jsonrpc2 Connection that is // ready for use. func (s *TCPServer) Connect(_ context.Context) jsonrpc2.Conn { … } type PipeServer … // NewPipeServer returns a test server that can be connected to via io.Pipes. func NewPipeServer(server jsonrpc2.StreamServer, framer jsonrpc2.Framer) *PipeServer { … } // Connect creates new io.Pipes and binds them to the underlying StreamServer. func (s *PipeServer) Connect(ctx context.Context) jsonrpc2.Conn { … } type connList … func (l *connList) add(conn jsonrpc2.Conn) { … } func (l *connList) Close() error { … }