TCP Message design question

The scenario you talk about, with a PC that can send control signals to the Cobra and the Cobra sends data (unasked), probably also needs to think about resillience. You can’t guarantee that a socket will be open in one direction or the other, if you restart Cobra or the PC gets restarted, or even perhaps your network switch is bounced. How big that window is would depend on how often you send the data to the PC, if that’s managing the connection. So perhaps you can’t always send the “lights on” command immediately if you only have a one-sided connection, you have to wait for the next regular transmission of data before you can piggy-back the response. Handling a two-sided listening scenario may be slightly harder but probably architecturally would be neater. In fact it may not be much harder since you’re dealing with a socket server and client at each end, in .Net, so it might be trivial since you can essentially run the same code twice!