all: minor cleanup (#545)
Also fix a flaky test case in TestStreamableServerTransport.
This commit is contained in:
parent
fd0dc9d741
commit
6dbf6c6450
1 changed files with 15 additions and 7 deletions
|
|
@ -104,8 +104,12 @@ func (t *InMemoryTransport) Connect(context.Context) (Connection, error) {
|
|||
return newIOConn(t.rwc), nil
|
||||
}
|
||||
|
||||
// NewInMemoryTransports returns two [InMemoryTransports] that connect to each
|
||||
// other.
|
||||
// NewInMemoryTransports returns two [InMemoryTransport] objects that connect
|
||||
// to each other.
|
||||
//
|
||||
// The resulting transports are symmetrical: use either to connect to a server,
|
||||
// and then the other to connect to a client. Servers must be connected before
|
||||
// clients, as the client initializes the MCP session during connection.
|
||||
func NewInMemoryTransports() (*InMemoryTransport, *InMemoryTransport) {
|
||||
c1, c2 := net.Pipe()
|
||||
return &InMemoryTransport{c1}, &InMemoryTransport{c2}
|
||||
|
|
|
|||
Loading…
Reference in a new issue