public static void CheckConnect() { NetClient client = new NetClient("Server", 9898, "Server"); client.HostName = "server"; BroadcastSystem.BroadcastConnectEvent(client, new ConnectEventArgs(true, client.HostName)); }
private static void LogToMonitor(string clientkey, string message, string time, LogType type) { string hostname = "Server"; if (clientkey != null) { NetClient client = NetClientManager.GetNetClient(clientkey); if (client != null) { hostname = client.HostName; } else { hostname = clientkey; } } string format = string.Format("{0} {1}: {2}", time, hostname, message); BroadcastSystem.BroadcastLogToMonitorHandler(format, type); }