Trouble with Netty IdleStateHandler - am I testing it the wrong way?

后端 未结 2 1130
被撕碎了的回忆
被撕碎了的回忆 2021-02-01 11:18

I have a toy Netty server and am trying to send heartbeat messages to clients when nothing has happened on their channels. I am testing this by telnetting to the server, writing

2条回答
  •  孤街浪徒
    2021-02-01 11:35

    You missed to add the HeartbeatHandler in the ChannelPipeline. You need to add IdleStateHandler AND HeartbeatHandler to the ChannelPipeline to have it work.

提交回复
热议问题