private void MessageThreadProc() { while (running) { try { // make a blocking call to receive a message from the serial bridge // say that we want to receive from any address on any port IPEndPoint remote = new IPEndPoint(IPAddress.Any, 0); byte[] data = client.Receive(ref remote); // dispatch the message via the feedback mapper mapper.HandleMessage(data, this, Services.Dataset); } catch (Exception) { // just ignore the error and try again for now // TODO: add in diagnostic and recovery functionality } } }