/// <summary> /// Send a command to all connected client /// </summary> /// <param name="pCommand">Command to send</param> public void SendCommand(Command pCommand) { if (!IsRunning) { throw new InvalidOperationException("Cannot send commands while server is not running"); } m_server.SendAll(pCommand.ToByteArray()); }
/// <summary> /// Send a notification to all connected clients /// </summary> /// <param name="pMessage">Message to be sent</param> public void NotifyAll(string pMessage) { if (!IsRunning) { throw new InvalidOperationException("Can't send a notification while server is not running"); } byte[] data = Command.PrefixCommand(CommandType.Notification, pMessage); m_server.SendAll(data); }
public void SendToAll(string pMessage) { byte[] data = Command.PrefixCommand(CommandType.Notification, pMessage); m_server.SendAll(data); }