Any object can be written into a netty channel?

30 views
Skip to first unread message

Ming

unread,
Sep 26, 2016, 8:32:09 PM9/26/16
to Netty discussions
The write api only needs an object, so I am wondering what *interface* is assumed for an object to write to a netty channel. I know they can be ByteBuf, String, FileRegion, etc., but what is the common interface for them (and many others)?

Norman Maurer

unread,
Sep 26, 2016, 11:48:06 PM9/26/16
to ne...@googlegroups.com
Netty allows Object as usually the user want to write some kind of pojo and then use a *Encoder to convert from it to ByteBuf. So your interface should just expose the pojo as type.

On 27 Sep 2016, at 02:32, Ming <xiami...@gmail.com> wrote:

The write api only needs an object, so I am wondering what *interface* is assumed for an object to write to a netty channel. I know they can be ByteBuf, String, FileRegion, etc., but what is the common interface for them (and many others)?

--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netty/fed9473d-476f-4c96-84fe-4e6f7a80c4d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages