1. 程式人生 > >使用netty編寫第一個hello netty服務器

使用netty編寫第一個hello netty服務器

分享 wid maven構建 17. nbsp 發送 maven 圖片 返回

技術分享圖片

1、使用maven構建netty基礎依賴

技術分享圖片


2、實現客戶端發送一個請求,服務器會返回hello netty,即構建hello netty服務器

技術分享圖片

3、為channel設置初始化器

技術分享圖片

技術分享圖片

4、編寫自定義助手類

技術分享圖片

5、netty生命周期

使用netty編寫第一個hello netty服務器