public static void SafeInvoke(this NetEventCallback callback, INetEventObject message) { if (callback != null) { callback.Invoke(message); } }
private void OnCloseCallback(INetEventObject message) { RawMessage msg = message as RawMessage; string port = msg.userData as string; Debug("Client OnClose, port:{0}", port); TCPTest.OnClientClose(this); }
private void OnCloseCallback(INetEventObject message) { RawMessage msg = message as RawMessage; string port = msg.data as string; Util.ClientLog("Client OnClose port:{0} uid:{1} ", port, uid); if (port != string.Empty) { TCPTest.OnClientClose(uid); } }
private void OnConnectionDropped(INetEventObject message) { Net.TCP.Server.ConnectionMessage connectionMessage = message as Net.TCP.Server.ConnectionMessage; Util.Debug.ServerLog("OnConnectionDropped form:{0}", connectionMessage.remote.ToString()); }
private void OnAccepted(INetEventObject message) { Net.TCP.Server.ConnectionMessage connectionMessage = message as Net.TCP.Server.ConnectionMessage; Util.Debug.ServerLog("Accepted form:{0}", connectionMessage.remote); }
private void OnConnectedFail(INetEventObject message) { Util.ClientLog("Client:{0} OnConnectedFail", uid); }
private void OnConnectedFail(INetEventObject message) { Debug("Client Connected Failed"); }
private void OnConnected(INetEventObject message) { Debug("Client Connected Success"); TCPTest.OnClientConnect(this); }