HPCC-12399 Address cleaner socket updates

Added writetms routine for address cleaner
updated after code review

Signed-off-by: Mark Kelly <mark.kelly@lexisnexis.com>