Response delimiter?

chudak meadandale at gmail.com
Tue Aug 30 18:08:04 EDT 2011


fwachs wrote:
> 
> Well, i do but i don't want to hard code it like that!
> 

Hard code it /like what/? You haven't shown any sample code to indicate what
you have even tried so far, what your approach is or what your api looks
like.

You an easily have whichever object is the target of your client's
interation with the channel add the terminator for you, e.g.

public void write(String response)
{
    channel.write(s);
    channel.write("\n");
}

Then your client just invokes write(...) when it wants to write to the
channel and this helper object adds the delimiter.

--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Response-delimiter-tp6742766p6744291.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list