public function checkMessage(MessageInterface $message) {
        if (!$message->isBinary()) {
            if (!$this->checkUtf8($message->getPayload())) {
                return Frame::CLOSE_BAD_PAYLOAD;
            }
        }

        return true;
    }
public function checkMessage(MessageInterface $message) {
        if (!$message->isBinary()) {
            if (!$this->checkUtf8($message->getPayload())) {
                return Frame::CLOSE_BAD_PAYLOAD;
            }
        }

        return true;
    }
public function checkMessage ( MessageInterface $ message ) { if ( ! $ message -> isBinary ( ) ) { if ( ! $ this -> checkUtf8 ( $ message -> getPayload ( ) ) ) { return Frame :: CLOSE_BAD_PAYLOAD ; } } return true ; }
Determine if a message is valid
@param \Ratchet\RFC6455\Messaging\MessageInterface
@return bool|int true if valid - false if incomplete - int of recommended close code
Determine if a message is valid