Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
qg-push
Commits
478907c2
Commit
478907c2
authored
Sep 08, 2022
by
李健华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不打包源码
parent
8dec1eea
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
pom.xml
pom.xml
+4
-0
readme.md
readme.md
+0
-7
WebsocketMessageHandler.java
...ava/com/netty/server/handler/WebsocketMessageHandler.java
+2
-0
No files found.
pom.xml
View file @
478907c2
...
...
@@ -13,6 +13,10 @@
<version>
0.0.1-SNAPSHOT
</version>
<name>
websocket-server
</name>
<description>
Demo project for Spring Boot
</description>
<properties>
<maven.test.skip>
true
</maven.test.skip>
<maven.source.skip>
true
</maven.source.skip>
</properties>
<dependencies>
<dependency>
<groupId>
cn.quantgroup.boot
</groupId>
...
...
readme.md
View file @
478907c2
...
...
@@ -5,13 +5,6 @@
-
netty是jboss提供的一个java开源框架,netty提供异步的、事件驱动的网络应用程序框架和工具,用以快速开发高性能、高可用性的网络服务器和客户端程序。
-
本项目是基于Netty搭建的基础项目模板。
## 环境
| # | 环境 | 版本 | 说明 |
| ---- | ---- | -------------- | --------------- |
| 1 | JDK | openJdk 11.0.8 | 建议JDK11及以上 |
## 项目结构
...
...
src/main/java/com/netty/server/handler/WebsocketMessageHandler.java
View file @
478907c2
...
...
@@ -60,6 +60,8 @@ public class WebsocketMessageHandler {
String
uri
=
request
.
uri
();
ConcurrentMap
<
String
,
String
>
paramMap
=
getUrlParams
(
uri
);
System
.
out
.
println
(
"接收到的参数是:"
+
JSON
.
toJSONString
(
paramMap
));
// this.sendResponse(ctx, request, new DefaultFullHttpResponse(request.protocolVersion(), HttpResponseStatus.FORBIDDEN, ctx.alloc().buffer()));
// ctx.close();
// 加校验
String
relationInfo
=
paramMap
.
get
(
"channelId"
)
+
"/"
+
paramMap
.
get
(
"bussinessId"
);
online
(
relationInfo
,
ctx
.
channel
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment