Skip to content

GauravBhardwaj/NettyClientServerChatExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. 

About

Netty Tutorial via Client and Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published