I have a byte array (actually the raw packet data) and I know its length. However, it may contain '\0' in the middle so that the example code doesn't work for me - such '\0' will be regarded as the end of string and I cannot send the whole array together to the destination.
I'm not quite familiar with Wangle and any idea for how to build a pipeline for my purpose?
Thanks!
P.S.
The pipeline in the sample code is showed below, it works perfect for the printable strings:
auto pipeline = EchoPipeline::create();
pipeline->addBack(AsyncSocketHandler(sock));
pipeline->addBack(
EventBaseHandler()); // ensure we can write from any thread
pipeline->addBack(LineBasedFrameDecoder(8192, false));
pipeline->addBack(StringCodec());
pipeline->addBack(EchoHandler());
I have a byte array (actually the raw packet data) and I know its length. However, it may contain '\0' in the middle so that the example code doesn't work for me - such '\0' will be regarded as the end of string and I cannot send the whole array together to the destination.
I'm not quite familiar with Wangle and any idea for how to build a pipeline for my purpose?
Thanks!
P.S. The pipeline in the sample code is showed below, it works perfect for the printable strings: