File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ namespace GameFrameX.ServerManager;
44
55public interface IServiceInfo
66{
7+ /// <summary>
8+ /// 会话ID
9+ /// </summary>
710 string SessionId { get ; }
811
912 /// <summary>
Original file line number Diff line number Diff line change @@ -16,12 +16,22 @@ public sealed class NamingServiceManager
1616 /// </summary>
1717 private readonly ConcurrentDictionary < long , IServiceInfo > _serverMap ;
1818
19+ /// <summary>
20+ ///
21+ /// </summary>
1922 public NamingServiceManager ( )
2023 {
2124 _serverMap = new ConcurrentDictionary < long , IServiceInfo > ( ) ;
2225 }
2326
27+ /// <summary>
28+ /// 服务器添加的时候触发的回调
29+ /// </summary>
2430 public Action < IServiceInfo > OnServerAdd ;
31+
32+ /// <summary>
33+ /// 服务器移除的时候触发的回调
34+ /// </summary>
2535 public Action < IServiceInfo > OnServerRemove ;
2636
2737 /// <summary>
@@ -67,7 +77,7 @@ public bool TrySessionRemove(string sessionId)
6777 /// </summary>
6878 /// <param name="sessionId"></param>
6979 /// <returns></returns>
70- public IServiceInfo ? GetNodeBySessionId ( string sessionId )
80+ public IServiceInfo GetNodeBySessionId ( string sessionId )
7181 {
7282 foreach ( var keyValuePair in _serverMap )
7383 {
You can’t perform that action at this time.
0 commit comments