aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-11-08 19:56:34 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-11-08 19:56:34 +0900
commitee159b255fbf77c04d8a68ec573d195e6fbe0791 (patch)
treeec1bee0cba718efec8d270a90c8669ff096ad529
parent2b23faa53b254bb20b5f3604f8bd8a42dab4f8d0 (diff)
downloadplum-ee159b255fbf77c04d8a68ec573d195e6fbe0791.tar.gz
doc: update
-rw-r--r--README.md5
-rw-r--r--lib/plum/client.rb5
2 files changed, 7 insertions, 3 deletions
diff --git a/README.md b/README.md
index 007c7be..b95ce07 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ A pure Ruby HTTP/2 implementation.
* OpenSSL 1.0.2 or newer (HTTP/2 requires ALPN)
* Optional:
* [http_parser.rb gem](https://rubygems.org/gems/http_parser.rb) (HTTP/1.x parser; if you use "http" URI scheme)
- * [rack gem](https://rubygems.org/gems/rack) if you use Plum as Rack server.
+ * [rack gem](https://rubygems.org/gems/rack) (if you use Plum as Rack server)
## Usage
### As a HTTP/2 (HTTP/1.x) client library
@@ -82,6 +82,9 @@ By default, Plum generates a dummy server certificate if `--cert` and `--key` op
## TODO
* **Better API**
+* Plum::Client
+ * Stream Priority support
+ * PING frame handling
## License
MIT License
diff --git a/lib/plum/client.rb b/lib/plum/client.rb
index 64452f3..cd1315b 100644
--- a/lib/plum/client.rb
+++ b/lib/plum/client.rb
@@ -53,7 +53,7 @@ module Plum
self
end
- # Waits for the asynchronous response(s) to finish.
+ # Resume communication with the server, until the specified (or all running) requests are complete.
# @param response [Response] if specified, waits only for the response
# @return [Response] if parameter response is specified
def wait(response = nil)
@@ -65,7 +65,7 @@ module Plum
end
end
- # Waits for the response headers.
+ # Resume communication with the server until the response headers are sent.
# @param response [Response] the incomplete response.
def wait_headers(response)
@session.succ while !response.failed? && !response.headers
@@ -92,6 +92,7 @@ module Plum
# @param headers [Hash<String, String>] the request headers
# @param body [String] the request body
# @param options [Hash<Symbol, Object>] the request options
+ # @param block [Proc] if passed, it will be called when received response headers.
def request(headers, body, options = {}, &block)
wait request_async(headers, body, options, &block)
end