From ef45e29ef9b189432636a83f11ee44ff3f1d5c8e Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 8 Sep 2021 19:00:17 +0200 Subject: [PATCH] fix indentation --- pq/Connection/: Asynchronous Usage.md | 50 +++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pq/Connection/: Asynchronous Usage.md b/pq/Connection/: Asynchronous Usage.md index 1043a49..8953a7d 100644 --- a/pq/Connection/: Asynchronous Usage.md +++ b/pq/Connection/: Asynchronous Usage.md @@ -39,33 +39,33 @@ Keep in mind that you have to test for write-readiness once *before* starting th if (stream_select($r, $w, $e, null)) { - // loop until the connection is established - while (true) { + // loop until the connection is established + while (true) { - switch ($c->poll()) { + switch ($c->poll()) { - case pq\Connection::POLLING_READING: - // we should wait for the stream to be read-ready - $r = array($c->socket); - stream_select($r, $w, $e, NULL); - break; - - case pq\Connection::POLLING_WRITING: - // we should wait for the stream to be write-ready - $w = array($c->socket); - $r = $e = null; - stream_select($r, $w, $e, null); - break; - - case pq\Connection::POLLING_FAILED: - printf("Connection failed: %s\n", $c->errorMessage); - break 2; - - case pq\Connection::POLLING_OK: - printf("Connection completed\n"); - break 2; - } - } + case pq\Connection::POLLING_READING: + // we should wait for the stream to be read-ready + $r = array($c->socket); + stream_select($r, $w, $e, NULL); + break; + + case pq\Connection::POLLING_WRITING: + // we should wait for the stream to be write-ready + $w = array($c->socket); + $r = $e = null; + stream_select($r, $w, $e, null); + break; + + case pq\Connection::POLLING_FAILED: + printf("Connection failed: %s\n", $c->errorMessage); + break 2; + + case pq\Connection::POLLING_OK: + printf("Connection completed\n"); + break 2; + } + } } ?> -- 2.30.2