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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -