From da438180024c7f79d67cfa78c6959b7c60a77e6a Mon Sep 17 00:00:00 2001 From: Theo Date: Sun, 9 Nov 2014 14:14:57 +0100 Subject: [PATCH] Use streams in the HTTP client example --- examples/http_client/lib/ione/http_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/http_client/lib/ione/http_client.rb b/examples/http_client/lib/ione/http_client.rb index 08a74c9..ef1a9e1 100644 --- a/examples/http_client/lib/ione/http_client.rb +++ b/examples/http_client/lib/ione/http_client.rb @@ -33,7 +33,7 @@ def get(url, headers={}) class HttpProtocolHandler def initialize(connection) @connection = connection - @connection.on_data(&method(:process_data)) + @connection.to_stream.subscribe(method(:process_data)) @http_parser = Http::Parser.new(self) @promises = [] end