public interface CrtHttpStreamHandler
Modifier and Type | Method and Description |
---|---|
default int |
onResponseBody(HttpStream stream,
ByteBuffer bodyBytesIn)
Called when new Response Body bytes have been received.
|
void |
onResponseComplete(HttpStream stream,
int errorCode)
Called from Native when the Response has completed.
|
void |
onResponseHeaders(HttpStream stream,
int responseStatusCode,
int blockType,
HttpHeader[] nextHeaders)
Called from Native when new Http Headers have been received.
|
default void |
onResponseHeadersDone(HttpStream stream,
int blockType)
Called from Native once all HTTP Headers are processed.
|
default boolean |
sendRequestBody(HttpStream stream,
ByteBuffer bodyBytesOut)
Called from Native when the Http Request has a Body (Eg PUT/POST requests).
|
void onResponseHeaders(HttpStream stream, int responseStatusCode, int blockType, HttpHeader[] nextHeaders)
stream
- The HttpStream objectresponseStatusCode
- The HTTP Response Status CodenextHeaders
- The headers received in the latest IO event.default void onResponseHeadersDone(HttpStream stream, int blockType)
stream
- The HttpStream objectblockType
- The type of the header block, corresponds to HttpHeaderBlock
default int onResponseBody(HttpStream stream, ByteBuffer bodyBytesIn)
bodyBytesIn
- The HTTP Body Bytes received in the last IO Event. The user MUST either copy all bytes from
this Buffer, since there will not be another chance to read this data.void onResponseComplete(HttpStream stream, int errorCode)
stream
- errorCode
- default boolean sendRequestBody(HttpStream stream, ByteBuffer bodyBytesOut)
stream
- The HttpStream for this Request/Response PairbodyBytesOut
- The Buffer to write the Request Body Bytes to.Copyright © 2019. All rights reserved.