Example #1
0
 /// <summary>
 /// Sends a NotificationPackage to all clients.
 /// </summary>
 /// <param name="mode">The Mode.</param>
 /// <param name="connections">The ConnectionParams.</param>
 private void SendNotificationPackage(NotificationMode mode, IConnection[] connections)
 {
     var notificationPackage = new NotificationPackage(connections, mode);
     Send(notificationPackage);
 }
Example #2
0
 /// <summary>
 /// Sends a NotificationPackage to all clients.
 /// </summary>
 /// <param name="mode">The Mode.</param>
 /// <param name="connections">The ConnectionParams.</param>
 private void SendNotificationPackage(NotificationMode mode, IConnection[] connections)
 {
     var notificationPackage = new NotificationPackage(connections, mode);
     for (int i = 0; i <= _connections.Count - 1; i++)
     {
         NetworkStream networkStream = _connections[i].Client.GetStream();
         PackageSerializer.Serialize(notificationPackage, networkStream);
         //May not be neccessary
         networkStream.Flush();
     }
 }