title: Netty 5.0 object send and receive
body: <p>I am attempting to get to grips with netty and i confess i am having a hard time doing the simplest of thing with it, i cant really find much in the way of tutorials or any as of yet published material.</p>
  
  <p>So on to the problem:</p>
  
  <p>I have downloaded the example ObjectEcho example from <a href="http://netty.io/5.0/xref/io/netty/example/objectecho/package-summary.html" rel="nofollow">http://netty.io/5.0/xref/io/netty/example/objectecho/package-summary.html</a></p>
  
  <p>I have it set up on localhost and when i start it all up and run the client i get the following:</p>
  
  <pre><code>Jul 11, 2015 11:21:34 PM io.netty.handler.logging.LoggingHandler channelRead
  INFO: [id: 0x3b3ab260, /0:0:0:0:0:0:0:0:8007] RECEIVED: [id: 0x1f7374e8,       /127.0.0.1:49196 =&gt; /127.0.0.1:8007]
  </code></pre>
  
  <p>Excellent, next i tried to send a String from the client like so:</p>
  
  <p>// Start the connection attempt.</p>
  
  <pre><code> b.connect(HOST, PORT).sync().channel().closeFuture().sync();
  
   b.connect().channel().write("Hello");
  </code></pre>
  
  <p>On the server side in the serverhandler class i add within channelRead method the following:</p>
  
  <pre><code>  if(msg instanceof String){
        ctx.write((String)msg);
        System.out.println((String)msg);
        }
  </code></pre>
  
  <p>I was hoping i would thus see on console the word "Hello".</p>
  
  <p>Instead i get nothing at all, so i am going to assume i am missing out a step, doing something terribly wrong or a mix of the two, any out there got the answer ?</p>