Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
ff9cdce9
Commit
ff9cdce9
authored
Apr 24, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释回调
parent
6e657714
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
core/src/main/java/com/wecloud/im/netty/handler/NettyApiRequest.java
+8
-8
No files found.
core/src/main/java/com/wecloud/im/netty/handler/NettyApiRequest.java
View file @
ff9cdce9
...
@@ -164,14 +164,14 @@ public class NettyApiRequest {
...
@@ -164,14 +164,14 @@ public class NettyApiRequest {
appUserChannelsService
.
online
(
client
.
getId
(),
jwtToken
.
getPlatform
(),
(
NioSocketChannel
)
ctx
.
channel
());
appUserChannelsService
.
online
(
client
.
getId
(),
jwtToken
.
getPlatform
(),
(
NioSocketChannel
)
ctx
.
channel
());
// 发布客户端在线状态变化事件
// 发布客户端在线状态变化事件
Long
appId
=
app
.
getId
();
//
Long appId = app.getId();
String
clientId
=
client
.
getClientId
();
//
String clientId = client.getClientId();
Integer
platform
=
jwtToken
.
getPlatform
();
//
Integer platform = jwtToken.getPlatform();
long
time
=
System
.
currentTimeMillis
();
//
long time = System.currentTimeMillis();
String
clientIp
=
ctx
.
channel
().
remoteAddress
().
toString
();
//
String clientIp = ctx.channel().remoteAddress().toString();
ClientOnlineStatusChangeEvent
clientOnlineStatusChangeEvent
=
new
ClientOnlineStatusChangeEvent
(
appId
,
//
ClientOnlineStatusChangeEvent clientOnlineStatusChangeEvent = new ClientOnlineStatusChangeEvent(appId,
clientId
,
1
,
platform
,
time
,
clientIp
);
//
clientId, 1, platform, time, clientIp);
eventPublisher
.
publishEvent
(
clientOnlineStatusChangeEvent
);
//
eventPublisher.publishEvent(clientOnlineStatusChangeEvent);
//移除当前api处理handler, 不再参与长连接处理
//移除当前api处理handler, 不再参与长连接处理
ctx
.
pipeline
().
remove
(
"SingleHttpRequestHandler"
);
ctx
.
pipeline
().
remove
(
"SingleHttpRequestHandler"
);
...
...
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