phprpc 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/client.rb +11 -1
- data/lib/crypt/xxtea.rb +3 -3
- data/lib/php/formator.rb +45 -45
- data/lib/phprpc.rb +3 -3
- data/lib/phprpc/base_server.rb +78 -74
- data/lib/phprpc/cgi_server.rb +5 -5
- data/lib/phprpc/client.rb +138 -81
- data/lib/phprpc/ebb_server.rb +5 -5
- data/lib/phprpc/fake_server.rb +3 -3
- data/lib/phprpc/fcgi_server.rb +7 -7
- data/lib/phprpc/lsapi_server.rb +7 -7
- data/lib/phprpc/mongrel_server.rb +3 -3
- data/lib/phprpc/scgi_server.rb +3 -3
- data/lib/phprpc/server.rb +9 -8
- data/lib/phprpc/thin_server.rb +5 -5
- data/lib/phprpc/webrick_server.rb +9 -9
- data/lib/powmod.rb +3 -3
- metadata +2 -2
data/lib/phprpc/lsapi_server.rb
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
# #
|
5
5
|
# lsapi_server.rb #
|
6
6
|
# #
|
7
|
-
# Release 3.0.
|
8
|
-
# Copyright
|
7
|
+
# Release 3.0.5 #
|
8
|
+
# Copyright by Team-PHPRPC #
|
9
9
|
# #
|
10
10
|
# WebSite: http://www.phprpc.org/ #
|
11
11
|
# http://www.phprpc.net/ #
|
@@ -23,7 +23,7 @@
|
|
23
23
|
#
|
24
24
|
# PHPRPC LSAPIServer library.
|
25
25
|
#
|
26
|
-
# Copyright
|
26
|
+
# Copyright: Ma Bingyao <andot@ujn.edu.cn>
|
27
27
|
# Version: 3.0
|
28
28
|
# LastModified: Sep 14, 2008
|
29
29
|
# This library is free. You can redistribute it and/or modify it.
|
@@ -31,7 +31,7 @@
|
|
31
31
|
require "phprpc/base_server"
|
32
32
|
|
33
33
|
module PHPRPC
|
34
|
-
|
34
|
+
|
35
35
|
class LSAPIServer < BaseServer
|
36
36
|
|
37
37
|
def initialize(options = {})
|
@@ -39,7 +39,7 @@ module PHPRPC
|
|
39
39
|
@options = {
|
40
40
|
:session_mode => :file,
|
41
41
|
:path => "/",
|
42
|
-
:expire_after => 1800,
|
42
|
+
:expire_after => 1800,
|
43
43
|
}.update(options)
|
44
44
|
@opts = OptionParser.new
|
45
45
|
@opts.banner = "Usage: #{@opts.program_name} lsapi [options]"
|
@@ -95,7 +95,7 @@ module PHPRPC
|
|
95
95
|
STDOUT.flush
|
96
96
|
end
|
97
97
|
end
|
98
|
-
|
98
|
+
|
99
99
|
end # class LSAPIServer
|
100
|
-
|
100
|
+
|
101
101
|
end # module PHPRPC
|
@@ -4,8 +4,8 @@
|
|
4
4
|
# #
|
5
5
|
# mongrel_server.rb #
|
6
6
|
# #
|
7
|
-
# Release 3.0.
|
8
|
-
# Copyright
|
7
|
+
# Release 3.0.5 #
|
8
|
+
# Copyright by Team-PHPRPC #
|
9
9
|
# #
|
10
10
|
# WebSite: http://www.phprpc.org/ #
|
11
11
|
# http://www.phprpc.net/ #
|
@@ -23,7 +23,7 @@
|
|
23
23
|
#
|
24
24
|
# PHPRPC MongrelServer library.
|
25
25
|
#
|
26
|
-
# Copyright
|
26
|
+
# Copyright: Ma Bingyao <andot@ujn.edu.cn>
|
27
27
|
# Version: 3.0
|
28
28
|
# LastModified: Sep 14, 2008
|
29
29
|
# This library is free. You can redistribute it and/or modify it.
|
data/lib/phprpc/scgi_server.rb
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
# #
|
5
5
|
# scgi_server.rb #
|
6
6
|
# #
|
7
|
-
# Release 3.0.
|
8
|
-
# Copyright
|
7
|
+
# Release 3.0.5 #
|
8
|
+
# Copyright by Team-PHPRPC #
|
9
9
|
# #
|
10
10
|
# WebSite: http://www.phprpc.org/ #
|
11
11
|
# http://www.phprpc.net/ #
|
@@ -23,7 +23,7 @@
|
|
23
23
|
#
|
24
24
|
# PHPRPC SCGIServer library.
|
25
25
|
#
|
26
|
-
# Copyright
|
26
|
+
# Copyright: Ma Bingyao <andot@ujn.edu.cn>
|
27
27
|
# Version: 3.0
|
28
28
|
# LastModified: Sep 14, 2008
|
29
29
|
# This library is free. You can redistribute it and/or modify it.
|
data/lib/phprpc/server.rb
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
# #
|
5
5
|
# server.rb #
|
6
6
|
# #
|
7
|
-
# Release 3.0.
|
8
|
-
# Copyright
|
7
|
+
# Release 3.0.5 #
|
8
|
+
# Copyright by Team-PHPRPC #
|
9
9
|
# #
|
10
10
|
# WebSite: http://www.phprpc.org/ #
|
11
11
|
# http://www.phprpc.net/ #
|
@@ -23,13 +23,14 @@
|
|
23
23
|
#
|
24
24
|
# PHPRPC Server library.
|
25
25
|
#
|
26
|
-
# Copyright
|
26
|
+
# Copyright: Ma Bingyao <andot@ujn.edu.cn>
|
27
27
|
# Version: 3.0
|
28
|
-
# LastModified:
|
28
|
+
# LastModified: Mar 8, 2009
|
29
29
|
# This library is free. You can redistribute it and/or modify it.
|
30
30
|
|
31
31
|
module PHPRPC
|
32
32
|
|
33
|
+
autoload :BaseServer, 'phprpc/base_server'
|
33
34
|
autoload :CGIServer, 'phprpc/cgi_server'
|
34
35
|
autoload :MongrelServer, 'phprpc/mongrel_server'
|
35
36
|
autoload :ThinServer, 'phprpc/thin_server'
|
@@ -39,8 +40,8 @@ module PHPRPC
|
|
39
40
|
autoload :EbbServer, 'phprpc/ebb_server'
|
40
41
|
autoload :WEBrickServer, 'phprpc/webrick_server'
|
41
42
|
autoload :FakeServer, 'phprpc/fake_server'
|
42
|
-
|
43
|
-
ARGV[0] = '' if ARGV[0].nil?
|
43
|
+
|
44
|
+
ARGV[0] = '' if ARGV[0].nil?
|
44
45
|
Server = case ARGV[0].downcase
|
45
46
|
when 'mongrel' then MongrelServer
|
46
47
|
when 'thin' then ThinServer
|
@@ -49,7 +50,7 @@ module PHPRPC
|
|
49
50
|
when 'lsapi' then LSAPIServer
|
50
51
|
when 'ebb' then EbbServer
|
51
52
|
when 'webrick' then WEBrickServer
|
52
|
-
else (ENV['GATEWAY_INTERFACE'] =~ /CGI\/\d.\d/ ? CGIServer : FakeServer)
|
53
|
+
else (ENV['GATEWAY_INTERFACE'] =~ /CGI\/\d.\d/ ? CGIServer : FakeServer)
|
53
54
|
end # class Server
|
54
|
-
|
55
|
+
|
55
56
|
end # module PHPRPC
|
data/lib/phprpc/thin_server.rb
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
# #
|
5
5
|
# thin_server.rb #
|
6
6
|
# #
|
7
|
-
# Release 3.0.
|
8
|
-
# Copyright
|
7
|
+
# Release 3.0.5 #
|
8
|
+
# Copyright by Team-PHPRPC #
|
9
9
|
# #
|
10
10
|
# WebSite: http://www.phprpc.org/ #
|
11
11
|
# http://www.phprpc.net/ #
|
@@ -23,7 +23,7 @@
|
|
23
23
|
#
|
24
24
|
# PHPRPC ThinServer library.
|
25
25
|
#
|
26
|
-
# Copyright
|
26
|
+
# Copyright: Ma Bingyao <andot@ujn.edu.cn>
|
27
27
|
# Version: 3.0
|
28
28
|
# LastModified: Sep 14, 2008
|
29
29
|
# This library is free. You can redistribute it and/or modify it.
|
@@ -103,7 +103,7 @@ module PHPRPC
|
|
103
103
|
@app = PHPRPC::BaseServer.new
|
104
104
|
self.debug = @options[:debug]
|
105
105
|
end
|
106
|
-
|
106
|
+
|
107
107
|
def start()
|
108
108
|
@options[:backend] = eval(@options[:backend], TOPLEVEL_BINDING) if @options[:backend]
|
109
109
|
app = self
|
@@ -119,7 +119,7 @@ module PHPRPC
|
|
119
119
|
app = self
|
120
120
|
end
|
121
121
|
end
|
122
|
-
Dir.chdir(@options[:chdir])
|
122
|
+
Dir.chdir(@options[:chdir])
|
123
123
|
Thin::Logging.debug = @options[:debug]
|
124
124
|
Thin::Logging.trace = @options[:trace]
|
125
125
|
server = Thin::Server.new(@options[:socket] || @options[:address], # Server detects kind of socket
|
@@ -4,8 +4,8 @@
|
|
4
4
|
# #
|
5
5
|
# webrick_server.rb #
|
6
6
|
# #
|
7
|
-
# Release 3.0.
|
8
|
-
# Copyright
|
7
|
+
# Release 3.0.5 #
|
8
|
+
# Copyright by Team-PHPRPC #
|
9
9
|
# #
|
10
10
|
# WebSite: http://www.phprpc.org/ #
|
11
11
|
# http://www.phprpc.net/ #
|
@@ -23,7 +23,7 @@
|
|
23
23
|
#
|
24
24
|
# PHPRPC WEBrickServer library.
|
25
25
|
#
|
26
|
-
# Copyright
|
26
|
+
# Copyright: Ma Bingyao <andot@ujn.edu.cn>
|
27
27
|
# Version: 3.0
|
28
28
|
# LastModified: Sep 12, 2008
|
29
29
|
# This library is free. You can redistribute it and/or modify it.
|
@@ -34,7 +34,7 @@ require "phprpc/base_server"
|
|
34
34
|
module PHPRPC
|
35
35
|
|
36
36
|
class WEBrickServlet < BaseServer
|
37
|
-
|
37
|
+
|
38
38
|
def get_instance(*a)
|
39
39
|
self
|
40
40
|
end
|
@@ -56,9 +56,9 @@ module PHPRPC
|
|
56
56
|
end
|
57
57
|
|
58
58
|
end # class WEBrickServlet
|
59
|
-
|
59
|
+
|
60
60
|
class WEBrickServer < WEBrickServlet
|
61
|
-
|
61
|
+
|
62
62
|
def initialize(options = {})
|
63
63
|
super()
|
64
64
|
@app = self
|
@@ -70,7 +70,7 @@ module PHPRPC
|
|
70
70
|
:RequestTimeout => 30,
|
71
71
|
:session_mode => :file,
|
72
72
|
:path => "/",
|
73
|
-
:expire_after => 1800,
|
73
|
+
:expire_after => 1800,
|
74
74
|
}.update(options)
|
75
75
|
@opts = OptionParser.new
|
76
76
|
@opts.banner = "Usage: #{@opts.program_name} webrick [options]"
|
@@ -108,7 +108,7 @@ module PHPRPC
|
|
108
108
|
exit
|
109
109
|
end
|
110
110
|
end
|
111
|
-
|
111
|
+
|
112
112
|
def start
|
113
113
|
if [:memcache, :pool].include?(@options[:session_mode]) then
|
114
114
|
old_app = @app
|
@@ -135,5 +135,5 @@ module PHPRPC
|
|
135
135
|
end
|
136
136
|
|
137
137
|
end # class WEBrickServer
|
138
|
-
|
138
|
+
|
139
139
|
end # module PHPRPC
|
data/lib/powmod.rb
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
# #
|
5
5
|
# powmod.rb #
|
6
6
|
# #
|
7
|
-
# Release 3.0.
|
8
|
-
# Copyright
|
7
|
+
# Release 3.0.5 #
|
8
|
+
# Copyright by Team-PHPRPC #
|
9
9
|
# #
|
10
10
|
# WebSite: http://www.phprpc.org/ #
|
11
11
|
# http://www.phprpc.net/ #
|
@@ -23,7 +23,7 @@
|
|
23
23
|
#
|
24
24
|
# Math.powmod
|
25
25
|
#
|
26
|
-
# Copyright
|
26
|
+
# Copyright: Ma Bingyao <andot@ujn.edu.cn>
|
27
27
|
# Version: 1.0
|
28
28
|
# LastModified: Aug 21, 2008
|
29
29
|
# This library is free. You can redistribute it and/or modify it.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phprpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MA Bingyao ( andot )
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-03-10 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|