- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 13 for newStream (0.46 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt
peer.acceptFrame() // DATA STREAM 3 peer.play() // Play it back. val connection = connect(peer) val stream1 = connection.newStream(headerEntries("a", "android"), true) val stream2 = connection.newStream(headerEntries("b", "banana"), true) connection.writePingAndAwaitPong() // Ensure the GO_AWAY that resets stream2 has been received. val sink1 = stream1.sink.buffer()
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Thu Jul 31 04:18:40 GMT 2025 - 75.5K bytes - Click Count (0) -
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(t.Context(), handlerTest, []byte(testPayload)) if !errors.Is(err, ErrUnknownHandler) { t.Fatalf("Unexpected error: %v, %T", err, err) } }) } func TestSingleRoundtripGenerics(t *testing.T) {Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 36.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/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,
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Thu Jul 31 04:18:40 GMT 2025 - 31.8K bytes - Click Count (0) -
internal/grid/README.md
}) ``` Sample call: ```go // Get a connection to the remote host conn := manager.Connection(host).Subroute("asubroute") payload := []byte("request") stream, err := conn.NewStream(ctx, grid.HandlerDiskInfo, payload) if err != nil { return err } // Read results from the stream err = stream.Results(func(result []byte) error {Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Fri Oct 10 18:57:03 GMT 2025 - 9.4K bytes - Click Count (0) -
internal/grid/connection_test.go
}() <-gotCall remote.debugMsg(debugKillInbound) local.debugMsg(debugKillInbound) <-gotResp // Must reconnect errFatal(remoteConn.WaitForConnect(t.Context())) stream, err := remoteConn.NewStream(t.Context(), handlerTest2, []byte(testPayload)) errFatal(err) go func() { for resp := range stream.responses { t.Log("Resp:", resp, err) } gotResp <- struct{}{} }() <-gotCall
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Wed Apr 09 14:28:39 GMT 2025 - 5.9K bytes - Click Count (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.
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Tue Feb 18 16:25:55 GMT 2025 - 27.7K bytes - Click Count (0) -
internal/grid/benchmark_test.go
if conn == nil { b.Fatal("No connection") } ctx, cancel := context.WithTimeout(b.Context(), 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 {Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 15.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2ExchangeCodec.kt
override fun writeRequestHeaders(request: Request) { if (stream != null) return val hasRequestBody = request.body != null val requestHeaders = http2HeadersList(request) stream = http2Connection.newStream(requestHeaders, hasRequestBody) // We may have been asked to cancel while creating the new stream and sending the request // headers, but there was still no stream to close. if (canceled) {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Jul 29 21:11:09 GMT 2025 - 7K bytes - Click Count (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 {
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 46.9K bytes - Click Count (0) -
cmd/storage-rest-server.go
) var errDiskStale = errors.New("drive stale") // To abstract a disk over network. type storageRESTServer struct { endpoint Endpoint } var ( storageCheckPartsRPC = grid.NewStream[*CheckPartsHandlerParams, grid.NoPayload, *CheckPartsResp](grid.HandlerCheckParts3, func() *CheckPartsHandlerParams { return &CheckPartsHandlerParams{} }, nil, func() *CheckPartsResp { return &CheckPartsResp{} })
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Tue May 27 15:19:03 GMT 2025 - 45.7K bytes - Click Count (0)