Forum Discussion
Hi Piotr,
i dont think that using "TCP::collect" (without specifying a buffer size) would be a good idea. In this case CLIENT_DATA would be triggered on each received "IP-Datagram" and may or may not cover the entire HTTP-request.
So you may get into trouble if someone is sending the HTTP request "CHAR" by "CHAR" and you may also become problems if the HTTP header is spanning multiple IP-Datagrams. To resolve those edge scenarios, you have to check on each received "IP-Datagram" if the entire HTTP-header (or at least the entire Cookie header value) is already received and if not wait for additional CLIENT_DATA.
In the end I'm somewhat sure that it would be much much much faster to use the build in C++ HTTP parser and use the HTTP_REQUEST event for any HTTP related operation.
P.s.: But indeed a very creative approach trying to optimize the Big-PIPE ;-)
Cheers, Kai