Understanding TCP and UDP message formats