private static void TcpSocket_OnSocketAction(SocketBaseArgs args) { switch (args.SocketEventType) { case SocketEventType.Exception: HandleException(); break; case SocketEventType.Socket: HandleTCPSocket((SocketBaseBehaviourArgs)args); break; default: break; } }
private async void NetSocket_RT_SocketActionEventHandler(SocketBaseArgs args) { switch (args.SocketEventType) { case SocketEventType.Exception: await HandleException_RT(); break; case SocketEventType.Socket: await HandleTCPSocket_RT((SocketBaseBehaviourArgs)args); break; default: break; } }