- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for NewStream (0.09 sec)
-
internal/grid/grid_test.go
if _, ok := err.(*RemoteErr); !ok { t.Fatalf("Unexpected error: %v, %T", err, err) } // Streams should not be able to set up until registered. // Thus, the error is a local error. _, err = remoteConn.NewStream(context.Background(), handlerTest, []byte(testPayload)) if !errors.Is(err, ErrUnknownHandler) { t.Fatalf("Unexpected error: %v, %T", err, err) } }) } func TestSingleRoundtripGenerics(t *testing.T) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 36.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt
check(!client) { "Client cannot push requests." } return newStream(associatedStreamId, requestHeaders, out) } /** * Returns a new locally-initiated stream. * * @param out true to create an output stream that we can use to send data to the remote peer. * Corresponds to `FLAG_FIN`. */ @Throws(IOException::class) fun newStream( requestHeaders: List<Header>, out: Boolean,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 32.6K bytes - Viewed (0) -
internal/grid/handlers.go
sharedResponse bool } // NewStream creates a typed handler that can provide Marshal/Unmarshal. // Use Register to register a server handler. // Use Call to initiate a clientside call. // newPayload can be nil. In that case payloads will always be nil. // newReq can be nil. In that case no input stream is expected and the handler will be called with nil 'in' channel.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 27.7K bytes - Viewed (0) -
internal/grid/benchmark_test.go
if conn == nil { b.Fatal("No connection") } ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) // Send the payload. t := time.Now() st, err := conn.NewStream(ctx, handlerTest, payload) if err != nil { if debugReqs { fmt.Println(err.Error()) } b.Fatal(err.Error()) } got := 0 err = st.Results(func(b []byte) error {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
internal/grid/connection.go
} client.cancelFn(context.Canceled) c.outgoing.Delete(client.MuxID) }() return client.traceRoundtrip(ctx, c.trace, h, req) } // NewStream creates a new stream. // Initial payload can be reused by the caller. func (c *Connection) NewStream(ctx context.Context, h HandlerID, payload []byte) (st *Stream, err error) { if !h.valid() { return nil, ErrUnknownHandler } if c.State() != StateConnected {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 46.7K bytes - Viewed (0) -
cmd/metacache-walk.go
// Ensure remote has the same disk ID. opts.DiskID = *client.diskID.Load() b, err := opts.MarshalMsg(grid.GetByteBuffer()[:0]) if err != nil { return toStorageErr(err) } st, err := client.gridConn.NewStream(ctx, grid.HandlerWalkDir, b) if err != nil { return toStorageErr(err) } return toStorageErr(st.Results(func(in []byte) error { _, err := wr.Write(in) return err })) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 01 05:17:37 UTC 2024 - 12.4K bytes - Viewed (0) -
cmd/storage-rest-server.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 45.7K bytes - Viewed (0) -
cmd/peer-rest-client.go
gridConn := client.gridConn() if gridConn == nil { return } payload, err := json.Marshal(traceOpts) if err != nil { bugLogIf(ctx, err) return } st, err := gridConn.NewStream(ctx, grid.HandlerTrace, payload) if err != nil { return } st.Results(func(b []byte) error { select { case traceCh <- b: default: // Do not block on slow receivers.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 26.1K bytes - Viewed (0)