static void Listener_Receive(object sender, ReceiveEventArgs e)
        {
            //Cast event sender as ClientPeer
            ListenerPeer sourcePeer = sender as ListenerPeer;

            // Get source node from client - client Name = SourceNode ID
            long sourceID = Convert.ToInt64(sourcePeer.Name); //wher message is coming from

            //then use the ID to retrieve the source node

            //Get the Message received
            Iso8583Message originalMessage = e.Message as Iso8583Message;

            //continue coding
            try
            {
                SourceNode sourceNode = new SourceNode
                {
                    Name      = ConfigurationSettings.AppSettings["NodeNameTroughSwitch"],
                    IPAddress = ConfigurationSettings.AppSettings["NodeIPThroughSwitch"],
                    Port      = ConfigurationSettings.AppSettings["NodePortThroughSwitch"]
                };
                CheckSourceNode checkSourceNode = new CheckSourceNode();
                //checkSourceNode.SourceNode(sourceNode, originalMessage);
                checkSourceNode.SourceNode(originalMessage);
                //originalMessage.SetResponseMessageTypeIdentifier();
                sourcePeer.Send(originalMessage);
                sourcePeer.Listener.Start();
            }
            catch (Exception ex)
            {
                LogErrors.WriteErrorLog(ex);
            }
        }
 protected override void OnStart(string[] args)
 {
     // TODO: Add code here to start your service.
     new InstantiateListenerPeer();
     LogErrors.WriteErrorLog("FEP service has started");
 }