/// <summary> /// Handle a shutdown notification message. /// </summary> /// <param name="Message">Supplies the message.</param> /// <param name="Source">Supplies the message sender.</param> private void OnRecvMessageShutdownNotify(NetworkMessage Message, GameServer Source) { BufferParser Parser = Message.GetParser(); int SourceServerId = Parser.ReadInt32(); Parser.FinishParsing(); if (SourceServerId != Source.ServerId) return; // // Tear down any state between the two servers. // }
/// <summary> /// Handle a database status notification. /// </summary> /// <param name="Message">Supplies the message.</param> /// <param name="Source">Supplies the message sender.</param> private void OnRecvMessageNotifyDatabaseStatus(NetworkMessage Message, GameServer Source) { BufferParser Parser = Message.GetParser(); int SourceServerId = Parser.ReadInt32(); bool DatabaseOnline = (Parser.ReadByte() == 0 ? false : true); Parser.FinishParsing(); if (SourceServerId != Source.ServerId) return; lock (WorldManager) { if (Source.Online) Source.DatabaseOnline = DatabaseOnline; } }
/// <summary> /// Handle an IPC wakeup message received. /// </summary> /// <param name="Message">Supplies the message.</param> /// <param name="Source">Supplies the message sender.</param> private void OnRecvMessageIPCWake(NetworkMessage Message, GameServer Source) { BufferParser Parser = Message.GetParser(); int SourceServerId = Parser.ReadInt32(); int DestinationServerId = Parser.ReadInt32(); Parser.FinishParsing(); if (SourceServerId != Source.ServerId || LocalServerId != DestinationServerId) return; // // Signal the world manager that it should break out of the polling // wait and immediately check for new IPC messages that are // available to process. // WorldManager.SignalIPCEventWakeup(); }