BroadcastError() public method

Sends an error message to all connected clients.
public BroadcastError ( string errorMessage ) : void
errorMessage string The error message to be sent.
return void
Exemplo n.º 1
0
            public override void Write(char value)
            {
                const string ErrorPrefix = "ERROR: ";
                string       message;

                m_message.Append(value);
                message = m_message.ToString();

                if (message.EndsWith(Environment.NewLine))
                {
                    if (message.StartsWith(ErrorPrefix))
                    {
                        m_host.BroadcastError(message.Substring(ErrorPrefix.Length));
                    }
                    else
                    {
                        m_host.BroadcastMessage(message);
                    }

                    m_message.Clear();
                }
            }