Google Protocol Buffers + ChunkedWriteHandler
이희승 (Trustin Lee)
trustin at gmail.com
Fri Aug 26 00:15:06 EDT 2011
Hi,
I don't think it's possible to use ChunkedWriteHandler to send an individual protobuf message field.
You'd better define your protobuf message like this:
message DataResponseStart {
required int64 timestamp = 1;
}
message DataResponseChunk {
required bytes content = 1;
}
message DataResponseEnd {
// or you can replace this with DataResponseChunk with a zero-byte content.
}
HTH
--
Trustin Lee (http://gleamynode.net/)
On Tuesday, August 23, 2011 at 9:43 PM, Evil Ipos wrote:
> Hi,
>
> Suppose i have protobuf message:
>
> message DataResponse {
> required int64 timestamp = 1;
> optional bytes content = 2;
> }
>
> My current pipline factory is:
>
> final ChannelPipeline pipeline = Channels.pipeline();
>
> pipeline.addLast("zlibDecoder", new ZlibDecoder());
> pipeline.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());
> pipeline.addLast("protobufDecoder", new ProtobufDecoder(
> DataViewerProtocol.DataRequest.getDefaultInstance()));
>
> pipeline.addLast("zlibEncoder", new ZlibEncoder(9));
> pipeline.addLast("frameEncoder",
> new ProtobufVarint32LengthFieldPrepender());
> pipeline.addLast("protobufEncoder", new ProtobufEncoder());
>
> pipeline.addLast("requestHandler", new RequestHandler(listenerService));
>
> *It's possible to send "content" field using ChunkedWriteHandler?*
>
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Google-Protocol-Buffers-ChunkedWriteHandler-tp6716029p6716029.html
> Sent from the Netty User Group mailing list archive at Nabble.com (http://Nabble.com).
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org (mailto:netty-users at lists.jboss.org)
> https://lists.jboss.org/mailman/listinfo/netty-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110826/fa024c79/attachment-0001.html
More information about the netty-users
mailing list