This might already have been discussed earlier, but I have no idea what to search for. In the Harmony tcp/ip examples about clients we can find the following (I have no idea if other examples use this as well): switch ( appData.state )
{
//bla..
{
//bla..