/// <summary>
 /// Broadcasts the specified array of <see cref="byte"/> to the clients of every <see cref="WebSocketService"/> instances
 /// in the <see cref="WebSocketService.Sessions"/>.
 /// </summary>
 /// <param name="data">
 /// An array of <see cref="byte"/> to broadcast.
 /// </param>
 public void Broadcast(byte[] data)
 {
     if (IsBound)
     {
         _sessions.Broadcast(data);
     }
 }
Exemple #2
0
        /// <summary>
        /// Broadcasts the specified array of <see cref="byte"/> to all clients.
        /// </summary>
        /// <param name="data">
        /// An array of <see cref="byte"/> to broadcast.
        /// </param>
        public void Broadcast(byte [] data)
        {
            if (data == null)
            {
                var msg = "'data' must not be null.";
                Log.Error(msg);
                Error(msg);

                return;
            }

            _sessions.Broadcast(data);
        }
Exemple #3
0
 /// <summary>
 /// Broadcasts the specified <see cref="string"/> to all clients.
 /// </summary>
 /// <param name="data">
 /// A <see cref="string"/> to broadcast.
 /// </param>
 public void Broadcast(string data)
 {
     _sessions.Broadcast(data);
 }