Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 561 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 561 Bytes

SERVERS step1: Create a Channel Handler.

1. Extend the SimpleChannelHandler
2. Override its method messageRecieved.
3. exceptionCaught to close the connection while IO issues.

Step2: Write a another method to run the handler.

1. Create a channel factory.
2. setPipeline factory.
3. Bootstarp method helps to set up the channel.

Step3: Print the message received

1. print the message which we have recieved. 
2. by creating a channelbuffer object.( is a fundamental data structure which stores a sequence of bytes in Netty.)
3. read the buffer.