You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
654 B
27 lines
654 B
using UnityEngine; |
|
using AX.Network.Common; |
|
using AX.Network.Protocols; |
|
using AX.NetworkSystem; |
|
|
|
public class CLOSED : MonoBehaviour |
|
{ |
|
protected virtual void OnEnable() |
|
{ |
|
NetworkMessageDispatcher.AddClosedListener(Execute); |
|
} |
|
|
|
protected virtual void OnDisable() |
|
{ |
|
NetworkMessageDispatcher.RemoveClosedListener(Execute); |
|
} |
|
|
|
protected virtual void OnDestroy() |
|
{ |
|
NetworkMessageDispatcher.RemoveClosedListener(Execute); |
|
} |
|
|
|
protected void Execute(IAppSession<BinaryProtocol, BinaryMessage> session, CloseReason reason) |
|
{ |
|
// TODO: 在这里处理会话连接关闭的情况 |
|
} |
|
} |