public function postArticle(Article $article): Generator
    {
        if (!$this->postingAllowed) {
            throw new \Exception("Posting not allowed");
        }

        // Tell the server we are about to post the article.
        yield from $this->sendCommand(new Command('POST'));

        // Send the encoded article.
        yield from $this->encoder->sendData($this->stream, (string)$article);

        // Verify the article posted successfully.
        $response = $this->encoder->readResponse($this->stream);
        if (!$response->isOk()) {
            throw new RemoteException($response->message(), $response->code());
        }
    }