Feature/read content length

see _bufferContainsMessage(), contains modifications to properly determine if there is any message in a buffer.