The solution to this issue is a redesign of the code so that all the code is incorporated in to the fx_rxtx class. The call to the send_msg method is taken in to the class and is initiated from a button call back. I am no longer attempting to make a call as shown in the main() function. I have implemented this change and it works.