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
a2a8c2c6
Commit
a2a8c2c6
authored
Mar 08, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日志打印
parent
c65190ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
core/src/main/java/com/wecloud/im/router/RouterSendServiceImpl.java
+4
-0
core/src/main/java/com/wecloud/im/ws/sender/ChannelSender.java
+2
-0
No files found.
core/src/main/java/com/wecloud/im/router/RouterSendServiceImpl.java
View file @
a2a8c2c6
package
com
.
wecloud
.
im
.
router
;
import
com.wecloud.im.ws.sender.ChannelSender
;
import
io.geekidea.springbootplus.framework.util.IpUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Slf4j
@Service
@DubboService
public
class
RouterSendServiceImpl
implements
RouterSendService
{
...
...
@@ -16,6 +19,7 @@ public class RouterSendServiceImpl implements RouterSendService {
@Override
public
void
sendMsgRemote
(
Long
clientId
,
Integer
platform
,
String
msg
)
{
log
.
info
(
"接收到rpc调用,本地ip {}"
,
IpUtil
.
getLocalhostIp
());
channelSender
.
sendMsgLocal
(
clientId
,
platform
,
msg
);
}
...
...
core/src/main/java/com/wecloud/im/ws/sender/ChannelSender.java
View file @
a2a8c2c6
package
com
.
wecloud
.
im
.
ws
.
sender
;
import
com.alibaba.fastjson.JSON
;
import
com.wecloud.im.executor.SendMsgThreadPool
;
import
com.wecloud.im.router.RouterSendService
;
import
com.wecloud.im.ws.cache.UserStateCacheManager
;
...
...
@@ -148,6 +149,7 @@ public class ChannelSender {
// dubbo指定ip调用
Address
address
=
new
Address
(
clientChannelInfo
.
getLanIp
(),
20881
);
RpcContext
.
getContext
().
setObjectAttachment
(
"address"
,
address
);
log
.
info
(
"dubbo指定ip调用 {}"
,
JSON
.
toJSONString
(
address
));
routerSendService
.
sendMsgRemote
(
toClientId
,
clientChannelInfo
.
getPlatform
(),
msgJson
);
}
}
...
...
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