UDP issues and workarounds

As per https://github.com/spark/docs/pull/169
Merge pull request #179 from psb777/patch-5

UDP issues and workarounds