Search code examples
nettynio

Channel vs Connection in netty


Hi I am new to jBoss netty.I was doing a sample using ClientBootStrap and ServerBootStrap and both of them posses individual ChannelFactory instances.

My confusion is that when the client connect to server, is this connection called the Channel ? or the client and server sides will keep separate Channels and client Channel connect to Server Channel?.

Can anyone clarify it.


Solution

  • The connection is between the two channels. The word 'channel' comes from NIO, and it's a poor choice, when you think about it. 'Socket' expresses it better: it's an endpoint of a connection.