private void Initialize()
 {
     using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "Initialize"))
     {
         try
         {
             // transceiver socket for sending and receiving freeform messages
             IUdpSocketTransceiver socket = UdpSocketTransceiverFactory.Create(this.ExecutorService, new UdpSocketTransceiverParameter()
             {
                 IPAddress = !_arg.LocalIpAddress.IsEmpty() ? _arg.LocalIpAddress : IPAddress.Any.ToString(),
                 ListenWaitTime = 100,
                 InterfaceIP = _arg.InterfaceIpAddress,
                 MulticastIP = _arg.MulticastIpAddress,
                 PortNo = _arg.ReceivePortNo,
                 UseInternalQueue = false,
             });
             _sockReceiver = socket;
             _sockTransmitter = socket;
             _sockReceiver.DataReceived += new UdpSocketReceivedDataHandler(OnReceiveUdpEntityFromSocket);
             _sockReceiver.Start();
             method.Info("Initialize (Success)");
         }
         catch (Exception ex)
         {
             method.Exception(ex);
         }
     }
 }
 private void Initialize()
 {
     using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "Initialize"))
     {
         try
         {
             // transceiver socket for sending and receiving freeform messages
             IUdpSocketTransceiver socket = UdpSocketTransceiverFactory.Create(this.ExecutorService, new UdpSocketTransceiverParameter()
             {
                 IPAddress        = !_arg.LocalIpAddress.IsEmpty() ? _arg.LocalIpAddress : IPAddress.Any.ToString(),
                 ListenWaitTime   = 100,
                 InterfaceIP      = _arg.InterfaceIpAddress,
                 MulticastIP      = _arg.MulticastIpAddress,
                 PortNo           = _arg.ReceivePortNo,
                 UseInternalQueue = false,
             });
             _sockReceiver               = socket;
             _sockTransmitter            = socket;
             _sockReceiver.DataReceived += new UdpSocketReceivedDataHandler(OnReceiveUdpEntityFromSocket);
             _sockReceiver.Start();
             method.Info("Initialize (Success)");
         }
         catch (Exception ex)
         {
             method.Exception(ex);
         }
     }
 }
示例#3
0
 public void Start()
 {
     _sockReceiver.Start();
 }