Gene,
You were correct. I was modifying the code without compiling it. I started with a Python script, so I got into the habit of just saving the script and then restarting it.
After recompiling the code, it now makes the connection to TCPIP port. I get the connected message. However, it still does not seem to receive the strings that can be seen in netcat.
It only takes less than one second from initializing the TCPClient to getting the connect message, so I know the IP address and port is there. I also tried sending data, to the port. That method is called without anything bad happening, but the message never appears at the TCPIP port because netcat does not report it.
The funny thing is that one time when I disabled the C# program, then I got a large flood of X10 RF data in the log. The CM19A is a USB to RF X10 interface. The log had entries for X10 events that happened hours before the program was disabled. Below are some samples of what came out in the log.
19:25:35.546 X10_RF String 11/27 16:37:48 Rx RF HouseUnit: C3 Func: Off 1001 HomeAutomation.HomeGenie.Automation
19:25:35.540 X10_RF String 11/28 01:27:21 Rx RF HouseUnit: C3 Func: On 1001 HomeAutomation.HomeGenie.Automation
19:25:35.536 X10_RF String 11/28 01:26:54 Rx RF HouseUnit: C3 Func: On 1001 HomeAutomation.HomeGenie.Automation
19:25:35.522 X10_RF String 11/27 16:36:33 Rx RF HouseUnit: C3 Func: On 1001 HomeAutomation.HomeGenie.Automation
The first timestamp is from HG, of course. The "X10_RF String" indicates that the string message handler is my C# code fires. The date, time stamp and the rest of the X10 data came from the mochad driver. Both the driver and HG are running on the same Raspberry Pi, so I would expect their timestamps to be close. Notice that when HG got the messages is vastly different than when mochad posted them to TCPIP. It is almost like they are being buffered up somewhere in a non-sequential order.
I tried to recreate the situation by starting the C# program, sending some data to the port, and then disabling the C# program. However, other than the one time, this still did not produce any messages.
Anyway, thanks for the help. I will keep playing with it and seeing if I can get it to dump the data again.