How to make a java client code to send data to a Netty4 socket with String encoders and decoders?

211 Views Asked by At

Situation:

I've a netty4 socket running on

netty4:tcp://localhost:5020?sync=true&encoder=#stringEncoder&decoder=#stringDecoder

.. and want to send data to this socket, using some client code.

Question:

How can I do that? I guess that a plain created socket will not work.

1

There are 1 best solutions below

4
On

Please refer to this example. It includes everything youre looking for including decoding and encoding -> link