Just an FYI on this one: The message can't exceed 255 bytes (including ~1-3 bytes for the header). I ran into this trying to send a long URL. Unlike HL1, you can't break up the message.
EDIT: I didn't mean the above code doesn't work, just that looking for the same HL1 functionality won't work.