add bytesWritten and messageBytesWritten