1 Reply Latest reply on Sep 17, 2014 6:56 AM by trohovsky

    Netty TCP reference binding

    gorfix

      Hello!
      We have to create a simple client-server socket communication. Remote server uses standart java.net api.

      What we need, is to add additional abstraction layer to standart java.net on the client side. I haven't found any information about tcp reference bindings.
      Typical communication scenario is described below:
      1) Client sends login message to remote server
      2)  Remote server responds ok through the same socket
      3) Some messages from client to server and vise-versa

       

      Is it somehow possible to read from and write to the server socket via TCP reference binding or maybe camel "netty:tcp" route? Any suggestions are welcome.

        • 1. Re: Netty TCP reference binding
          trohovsky

          Hi Ilia,

           

          I have achieved two-way communication on TCP service by setting of these parameters:

           

          <netty:encoders>#StringEncoder</netty:encoders>

          <netty:decoders>#StringDecoder</netty:decoders>

          <netty:allowDefaultCodec>false</netty:allowDefaultCodec>

           

          maybe it will be the same for a reference.

           

          Tomas