Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
ws-rst
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qlintonger xeno
ws-rst
Commits
e98970f3
Commit
e98970f3
authored
Feb 26, 2025
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
再次更新+2
parent
3fde40ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/events.rs
+4
-0
No files found.
src/events.rs
View file @
e98970f3
...
@@ -159,12 +159,16 @@ pub async fn handle_events(mut receiver: mpsc::UnboundedReceiver<Event>) {
...
@@ -159,12 +159,16 @@ pub async fn handle_events(mut receiver: mpsc::UnboundedReceiver<Event>) {
println!
(
"将用户信息插入到 Redis 中时出错: {}"
,
e
);
println!
(
"将用户信息插入到 Redis 中时出错: {}"
,
e
);
}
}
});
});
tokio
::
spawn
(
async
move
{
notify_all_clients_to_update_online_users
()
.await
;
notify_all_clients_to_update_online_users
()
.await
;
});
}
}
Event
::
CloseConnection
(
from_id
)
=>
{
Event
::
CloseConnection
(
from_id
)
=>
{
println!
(
"有关闭的连接 用户id {:?} 更新在线用户列表事件触发"
,
from_id
);
println!
(
"有关闭的连接 用户id {:?} 更新在线用户列表事件触发"
,
from_id
);
close_existing_connection
(
&
from_id
,
false
)
.await
;
close_existing_connection
(
&
from_id
,
false
)
.await
;
tokio
::
spawn
(
async
move
{
notify_all_clients_to_update_online_users
()
.await
;
notify_all_clients_to_update_online_users
()
.await
;
});
}
}
Event
::
SendClientMessage
(
from_id
,
msg
,
close
)
=>
{
Event
::
SendClientMessage
(
from_id
,
msg
,
close
)
=>
{
println!
(
"事件中心代发消息 ===>> 发送消息 {:?} 到客户端 {:?}"
,
msg
,
from_id
);
println!
(
"事件中心代发消息 ===>> 发送消息 {:?} 到客户端 {:?}"
,
msg
,
from_id
);
...
...
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