Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- virtual public void TransmitMessage(string inputmsg,out string outputmsg)
- {
- Utils.m_appLogger.Info("DEV-596 - Inside TransmitMessage");
- Utils.m_appLogger.Info(string.Format("DEV-596 - inputmsg={0}", inputmsg));
- outputmsg = string.Empty;
- for (int i = 0; i < 3; i++)
- {
- try
- {
- Utils.m_appLogger.Info(string.Format("DEV-596 - Calling ConnectToServer, Attempt#:{0}", i));
- bool bSuccess = connectToServer();
- if (!bSuccess)
- {
- Utils.m_appLogger.Info("DEV-596 - Calling ConnectToServer failed. Attempting again.");
- continue;
- }
- Utils.m_appLogger.Info("DEV-596 - Calling SendMessage");
- ProcessResult result = SendMessage(inputmsg);
- if (result == ProcessResult.FAILURE)
- {
- Utils.m_appLogger.Info("DEV-596 - Calling SendMessage failed. Calling closeConnection() Attempting again.");
- continue;
- }
- Utils.m_appLogger.Info("DEV-596 - Calling ReadMessage");
- outputmsg = ReadMessage();
- if (String.IsNullOrEmpty(outputmsg.Trim()))
- {
- Utils.m_appLogger.Info("DEV-596 - Calling SendMessage failed. Calling closeConnection() Attempting again.");
- continue;
- }
- closeConnection();
- break;
- }
- catch (Exception ex)
- {
- Utils.m_appLogger.Fatal("EXception in TransmitMessage",ex);
- continue;
- }
- }
- Utils.m_appLogger.Info(string.Format("DEV-596 - outputmsg={0}", outputmsg));
- }
Add Comment
Please, Sign In to add comment