title: Netty is giving me a wrong port using TCP
body: <p>I'm using Netty with Java trying to configure a TCP client. Everything is working so far, except that I'm connecting on port 1050 but when I call messageEvent.getRemoteAddress() on messageReceived() method of the handler, I'm getting the port 1500. I changed the port to 1049 but I'm still receiving 1500. This is Netty's problem or can it be the server's problem?</p>
  
  <p>My hardware setup here is: this netty client running on a Java server, and several access control equipments spread through the area here. The equipments act as tcp servers and the netty as the client, that process everything the server sends and just reply to them.</p>
  
  <p>The tcp server initialization is this:</p>
  
  <pre><code>private ChannelFactory fabrica;
  private ServerBootstrap bootstrap;
  
  public void iniciarServidorTCP() {
      fabrica = new NioServerSocketChannelFactory(
              Executors.newCachedThreadPool(),
              Executors.newCachedThreadPool());
      bootstrap = new ServerBootstrap(fabrica);
      bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
  
          @Override
          public ChannelPipeline getPipeline() throws Exception {
              ChannelPipeline pipeline = Channels.pipeline();
              pipeline.addLast("decoderDeMensagem", new MensagemDecoderTCP());
              pipeline.addLast("handlerGerente", new GerenteTCP());
              pipeline.addLast("encoder de mensagem", new MensagemEncoderTCP());
              return pipeline;
          }
      });
      bootstrap.setOption("child.tcpNoDelay", true);
      bootstrap.setOption("child.reuseAddress", true);
      bootstrap.bind(new InetSocketAddress(1050));
  }
  </code></pre>
  
  <p>Any idea why I'm getting 1500 instead of 1050? Could it be a problem with the equipment?</p>