java - Send separate messages with Netty -
i have netty client makes call:
channel.writeandflush(unpooled.copiedbuffer("msg", charsetutil.utf_8)).sync();
the server has this:
public void channelread(channelhandlercontext ctx, object msg) { bytebuf buf = (bytebuf) msg; string in = buf.tostring(charsetutil.utf_8);
if client calls writeandflush several time, server may receive several messages @ same time, i.e. "msgmsgmsgmsg".
how can make client / server send/receive each message separately?
[netty 4.1.15]
Comments
Post a Comment