fuzhengwei / fuzhengwei/blog.github.io

netty案例,netty4.1中级拓展篇五《基于Netty搭建WebSocket,模仿微信聊天页面》 - bugstack虫洞栈

Open
#93 0 comments 0 reactions 0 assignees View on GitHub
32ad5e911b0792ac6fdc80a7a3be7fa1 gitment
Dominant language
HTML
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

https://bugstack.cn/itstack-demo-netty-2/2019/08/20/netty%E6%A1%88%E4%BE%8B-netty4.1%E4%B8%AD%E7%BA%A7%E6%8B%93%E5%B1%95%E7%AF%87%E4%BA%94-%E5%9F%BA%E4%BA%8ENetty%E6%90%AD%E5%BB%BAWebSocket-%E6%A8%A1%E4%BB%BF%E5%BE%AE%E4%BF%A1%E8%81%8A%E5%A4%A9%E9%A1%B5%E9%9D%A2.html

前言介绍


本章节我们模仿微信聊天页面,开发一个基于Netty搭建WebSocket通信案例。Netty的应用方面非常广;聊天、MQ、RPC、数据等等,在5G到来的时候更加需要大量数据传输,Netty的应用也会更加广阔。



  1. 这个案例使用SpringBoot+Netty+WebSocket搭建功能。

  2. 使用Netty提供的HttpServerCodec、HttpObjectAggregator、ChunkedWriteHandler进行编码解码处理。

  3. 通信逻辑尽可能简化到只了解根本,便于后续个人应用及开发的拓展。

    1. 客户端链接成功后,向服务端发送请求获取个人信息,也可以拓展为登录请求。

    2. 获取个人信息后,就可以知道差异化展示消息到页面。



开发环境



  1. jdk1.8【jdk1.7以下只能部分支持netty】

  2. Netty4.1.36.Final【netty3.x 4.x 5每次的变化较大,接口类名也随着变化】

  3. jquery.min.js、jquery.serialize-object.min.js

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue points to a Netty 4.1 WebSocket article and names Spring Boot, Netty, jQuery, and JDK 1.8, but it identifies no repository file, test, or reproducible failure. Start by opening the linked article and locating the reported problem; completion criteria cannot be defined until a concrete correction is specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, jquery, spring-boot
Domain
documentation
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.