Exemplo n.º 1
0
        public EAEPBroadcaster(string host, string application, MulticastSettings multicastSettings)
        {
            if(multicastSettings == null)
                throw new ArgumentNullException("multicastSettings");

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

            Settings = settings;
        }
Exemplo n.º 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.
     }
 }
Exemplo n.º 4
0
 private void Initialise(MulticastSettings multicastSettings)
 {
     MulticastSettings = multicastSettings;
     _multicaster.DataReceived += new ReceiveHandler(Multicaster_DataReceived);
 }
Exemplo n.º 5
0
 public EAEPNode(MulticastSettings multicastSettings, IMulticast multicaster, IEAEPMessageSerializer eaepMessageSerializer)
 {
     _multicaster = multicaster;
     _eaepMessageSerializer = eaepMessageSerializer;
     Initialise(multicastSettings);
 }
Exemplo n.º 6
0
 public EAEPNode(MulticastSettings multicastSettings)
     : this(multicastSettings, new Multicast(multicastSettings), new EAEPMessageSerializer())
 {
 }
Exemplo n.º 7
0
 public MulticastSender(MulticastSettings settings)
 {
     endPoint = new IPEndPoint(settings.MulticastGroupAddress, settings.Port);
     socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
 }
Exemplo n.º 8
0
 public EAEPMonitor(MulticastSettings multicastSettings, string storePath)
 {
     Initialise(multicastSettings, storePath);
 }
Exemplo n.º 9
0
 public EAEPMonitor(MulticastSettings multicastSettings)
 {
     Initialise(multicastSettings, null);
 }
Exemplo n.º 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);
        }