make ConnectionWriteLoop public to simplify testing