HAYASHI Kentaro
null+****@clear*****
Thu Dec 26 12:19:29 JST 2013
HAYASHI Kentaro 2013-12-26 12:19:29 +0900 (Thu, 26 Dec 2013) New Revision: 3a61455cccbe4c9fadbb1e2bd48ddd74b83fa037 https://github.com/ranguba/gqtp/commit/3a61455cccbe4c9fadbb1e2bd48ddd74b83fa037 Message: Fix default port number for GQTP 10041 -> 10043 Modified files: README.md bin/gqtp-proxy lib/gqtp/client.rb lib/gqtp/connection/coolio.rb lib/gqtp/connection/synchronous.rb lib/gqtp/connection/thread.rb lib/gqtp/proxy.rb lib/gqtp/server.rb Modified: README.md (+4 -4) =================================================================== --- README.md 2013-12-16 21:18:05 +0900 (18b95eb) +++ README.md 2013-12-26 12:19:29 +0900 (79fa83e) @@ -22,7 +22,7 @@ for high concurrency use. ### Client - client = GQTP::Client.new(:address => "192.168.0.1", :port => 10041) + client = GQTP::Client.new(:address => "192.168.0.1", :port => 10043) request = client.send("status") do |header, body| p body # => "{\"alloc_count\":163,...}" end @@ -30,7 +30,7 @@ for high concurrency use. ### Server - server = GQTP::Server.new(:address => "192.168.0.1", :port => 10041) + server = GQTP::Server.new(:address => "192.168.0.1", :port => 10043) server.on_request do |request, client| body = "{\"alloc_count\":163,...}" header = GQTP::Header.new @@ -46,9 +46,9 @@ for high concurrency use. ### Proxy proxy = GQTP::Proxy.new(:listen_address => "127.0.0.1", - :listen_port => 10041, + :listen_port => 10043, :upstream_address => "192.168.0.1", - :upstream_port => 10041) + :upstream_port => 10043) proxy.run.wait ## Dependencies Modified: bin/gqtp-proxy (+2 -2) =================================================================== --- bin/gqtp-proxy 2013-12-16 21:18:05 +0900 (ce48e52) +++ bin/gqtp-proxy 2013-12-26 12:19:29 +0900 (02a49cf) @@ -23,9 +23,9 @@ require "gqtp" options = OpenStruct.new options.listen_address = "0.0.0.0" -options.listen_port = 10041 +options.listen_port = 10043 options.upstream_address = nil -options.upstream_port = 10041 +options.upstream_port = 10043 options.backend = :thread parser = OptionParser.new Modified: lib/gqtp/client.rb (+1 -1) =================================================================== --- lib/gqtp/client.rb 2013-12-16 21:18:05 +0900 (8d20dad) +++ lib/gqtp/client.rb 2013-12-26 12:19:29 +0900 (01e2db2) @@ -25,7 +25,7 @@ module GQTP def initialize(options={}) @options = options.dup @options[:address] ||= "127.0.0.1" - @options[:port] ||= 10041 + @options[:port] ||= 10043 @connection = create_connection end Modified: lib/gqtp/connection/coolio.rb (+2 -2) =================================================================== --- lib/gqtp/connection/coolio.rb 2013-12-16 21:18:05 +0900 (cdae514) +++ lib/gqtp/connection/coolio.rb 2013-12-26 12:19:29 +0900 (d66941e) @@ -87,7 +87,7 @@ module GQTP def initialize(options={}) @options = options @address = options[:address] || "127.0.0.1" - @port = options[:port] || 10041 + @port = options[:port] || 10043 @loop = options[:loop] || ::Coolio::Loop.default @socket = Socket.connect(@address, @port) @socket.attach(@loop) @@ -111,7 +111,7 @@ module GQTP def initialize(options={}) @options = options @address = options[:address] || "0.0.0.0" - @port = options[:port] || 10041 + @port = options[:port] || 10043 @loop = options[:loop] || ::Coolio::Loop.default end Modified: lib/gqtp/connection/synchronous.rb (+2 -2) =================================================================== --- lib/gqtp/connection/synchronous.rb 2013-12-16 21:18:05 +0900 (0a913f8) +++ lib/gqtp/connection/synchronous.rb 2013-12-26 12:19:29 +0900 (551a4c7) @@ -62,7 +62,7 @@ module GQTP def initialize(options={}) @options = options @address = options[:address] || "127.0.0.1" - @port = options[:port] || 10041 + @port = options[:port] || 10043 @socket = TCPSocket.open(@address, @port) @io = IO.new(@socket) end @@ -85,7 +85,7 @@ module GQTP def initialize(options={}) @options = options @address = options[:address] || "0.0.0.0" - @port = options[:port] || 10041 + @port = options[:port] || 10043 @backlog = options[:backlog] || 128 end Modified: lib/gqtp/connection/thread.rb (+2 -2) =================================================================== --- lib/gqtp/connection/thread.rb 2013-12-16 21:18:05 +0900 (0625096) +++ lib/gqtp/connection/thread.rb 2013-12-26 12:19:29 +0900 (eb42e75) @@ -73,7 +73,7 @@ module GQTP def initialize(options={}) @options = options @address = options[:address] || "127.0.0.1" - @port = options[:port] || 10041 + @port = options[:port] || 10043 @socket = TCPSocket.open(@address, @port) @io = IO.new(@socket) end @@ -96,7 +96,7 @@ module GQTP def initialize(options={}) @options = options @address = options[:address] || "0.0.0.0" - @port = options[:port] || 10041 + @port = options[:port] || 10043 @backlog = options[:backlog] || 128 end Modified: lib/gqtp/proxy.rb (+2 -2) =================================================================== --- lib/gqtp/proxy.rb 2013-12-16 21:18:05 +0900 (7cdfec5) +++ lib/gqtp/proxy.rb 2013-12-26 12:19:29 +0900 (f24059b) @@ -25,9 +25,9 @@ module GQTP def initialize(options={}) @options = options.dup @listen_address = @options[:listen_address] || "0.0.0.0" - @listen_port = @options[:listen_port] || 10041 + @listen_port = @options[:listen_port] || 10043 @upstream_address = @options[:upstream_address] || "127.0.0.1" - @upstream_port = @options[:upstream_port] || 10041 + @upstream_port = @options[:upstream_port] || 10043 @connection = @options[:connection] || :thread @server = Server.new(:address => @listen_address, :port => @listen_port, Modified: lib/gqtp/server.rb (+1 -1) =================================================================== --- lib/gqtp/server.rb 2013-12-16 21:18:05 +0900 (84499a3) +++ lib/gqtp/server.rb 2013-12-26 12:19:29 +0900 (2f81193) @@ -24,7 +24,7 @@ module GQTP def initialize(options={}) @options = options.dup @options[:address] ||= "0.0.0.0" - @options[:port] ||= 10041 + @options[:port] ||= 10043 @on_request = nil @on_connect = nil end -------------- next part -------------- HTML����������������������������...ダウンロード