Beispiel #1
0
        public EAEPBroadcaster(string host, string application, MulticastSettings multicastSettings)
        {
            if(multicastSettings == null)
                throw new ArgumentNullException("multicastSettings");

            ConstructorLogic(host, application, new MulticastSender(multicastSettings));
        }
Beispiel #2
0
        public Multicast(MulticastSettings settings)
        {
            if(settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            Settings = settings;
        }
Beispiel #3
0
 static Configuration()
 {
     AppSettingsReader reader = new AppSettingsReader();
     try
     {
         MulticastSettings = new eaep.multicast.MulticastSettings(
             (string)reader.GetValue("MulticastGroupAddress", typeof(string)),
             (int)reader.GetValue("MulticastPortNumber", typeof(int)),
             (int)reader.GetValue("MulticastTTL", typeof(int))
             );
     }
     catch (Exception)
     {
         // if any errors reading the config file then leave settings as they are.
     }
 }
Beispiel #4
0
 private void Initialise(MulticastSettings multicastSettings)
 {
     MulticastSettings = multicastSettings;
     _multicaster.DataReceived += new ReceiveHandler(Multicaster_DataReceived);
 }
Beispiel #5
0
 public EAEPNode(MulticastSettings multicastSettings, IMulticast multicaster, IEAEPMessageSerializer eaepMessageSerializer)
 {
     _multicaster = multicaster;
     _eaepMessageSerializer = eaepMessageSerializer;
     Initialise(multicastSettings);
 }
Beispiel #6
0
 public EAEPNode(MulticastSettings multicastSettings)
     : this(multicastSettings, new Multicast(multicastSettings), new EAEPMessageSerializer())
 {
 }
Beispiel #7
0
 public MulticastSender(MulticastSettings settings)
 {
     endPoint = new IPEndPoint(settings.MulticastGroupAddress, settings.Port);
     socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
 }
Beispiel #8
0
 public EAEPMonitor(MulticastSettings multicastSettings, string storePath)
 {
     Initialise(multicastSettings, storePath);
 }
Beispiel #9
0
 public EAEPMonitor(MulticastSettings multicastSettings)
 {
     Initialise(multicastSettings, null);
 }
Beispiel #10
0
        protected void Initialise(MulticastSettings multicastSettings, string storePath)
        {
            monitorStore = new SQLMonitorStore(Configuration.MonitorStoreConnectionString);

            eaepNode = new EAEPNode(multicastSettings);
            eaepNode.MessageReceived += new MessageReceivedHandler(eaepNode_MessageReceived);

            monitorService = new EAEPMonitorService(this);
            monitorService.Stopped += new EventHandler(monitorService_Stopped);
        }