Exemple #1
0
        public static void CheckConnect()
        {
            NetClient client = new NetClient("Server", 9898, "Server");

            client.HostName = "server";
            BroadcastSystem.BroadcastConnectEvent(client,
                                                  new ConnectEventArgs(true, client.HostName));
        }
Exemple #2
0
        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);
        }