Interface TcpResponse
- All Superinterfaces:
BaseResponse
- All Known Subinterfaces:
Response,TcpResponse
Response specialized for TCP allowing piping traffic from client to backend.
- Author:
- Benoit BORDIGONI (benoit.bordigoni at graviteesource.com), GraviteeSource Team
-
Method Summary
-
Method Details
-
pipeDownstream
void pipeDownstream()Setup internally a pipe downstream traffic bytes from backend to the client -
chunks
Set the current response body chunks from aFlowableofBuffer. This is useful to directly pump the upstream chunks to the downstream without having to load all the chunks in memory.WARN:
- replacing the response chunks will NOT "drain" the previous response that was in place.
- You MUST ensure to consume the previous chunks by yourself when using it.
- Parameters:
chunks- theFlowableof chunks representing the response to push back to the downstream.
-
chunks
io.reactivex.rxjava3.core.Flowable<Buffer> chunks()Get the current response body chunks asFlowableofBuffer. This is useful when you want to manipulate the entire body without having to load it in memory.WARN: you should not keep a direct reference on the body chunks as they could be overridden by others at anytime.
- Returns:
- a
Flowablecontaining the current body response chunks.
-