methods prepareWriteBuffer() and writeToChannel() extracted from sendMessage()
sendBroadcastMessage() method is implemented
some comments added
readIncommingMessage() implemented