group together messages by using a buffered writer between the network connection and the WriteMessage() function