Closed zuowanbushiwo closed 4 years ago
Can you provide more informations about what are you trying to do and what do you mean by streamed requests?
Hi 👍
thanks very much!
I want use HTTP/2 multiplexing , one connection Ceate multiple independent data streams and each
data stream can be independent of the request and response。 When post request, create a data
stream within the physical connection, send the request, and close the data flow after receiving the server response., like
okhttp3 ,it RequestBody can be a StreamRequestBody which has a BufferedSink, when write data to BufferedSink ,it can auto post data to server before close it。like this:
public class StreamRequestBody extends RequestBody { private final Pipe pipe = new Pipe(8192); private final BufferedSink mSink = Okio.buffer(pipe.sink());
public BufferedSink sink() {
return mSink;
}
} and write data like this: bufferedSink.write(recordAudioData);
thanks!!
I think that you can use the curl_multi interface to implement what you described here.
I want to use streams in a program I am writing, like java okhttp3, can you support?