(This will break if there's a newline in the data, which I don't *think* will happen, but I need someone who knows this protocol to check this over. Changing it is a snap, of course)