mrpin-sdk 1.0.53 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -7
- data/lib/mrpin/core/app_info/app_info_base.rb +1 -1
- data/lib/mrpin/core/constants/constants_remote.rb +0 -1
- data/lib/mrpin/core/remote/socket/base/manager_remote_socket_base.rb +0 -5
- data/lib/mrpin/core/remote/socket/flash/manager_remote_socket_flash.rb +0 -10
- data/lib/mrpin/core/remote/socket/unity/manager_remote_socket_unity.rb +0 -10
- data/mrpin-sdk.gemspec +1 -1
- metadata +2 -4
- data/lib/mrpin/core/remote/socket/base/socket_client_crossdomain.rb +0 -33
- data/lib/mrpin/core/remote/socket/with_policy/socket_client_with_policy.rb +0 -66
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb3334062ab46bb4750bf450a443a8cacda479b2
|
4
|
+
data.tar.gz: b9461160c41e830f29d52cfce6d7fddce1d71e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a429449f31116a70b53758ce8057c061223055952b6e6289c0ac19c86fd4bf5e266dad8a22294aea33cc61c6244e7c17ca96b149015f7a436adc3213d3fba81
|
7
|
+
data.tar.gz: 8686c3f22172cdd1a50208ba1d2a7dea0a341ea309473208de3d96e4fc8f6e1ce0923ef6d813587848ee33d5131b7b6f5d95aa22d655b499b7607358e559ba67
|
data/README.md
CHANGED
@@ -7,15 +7,12 @@ TODO: Write a gem description
|
|
7
7
|
|
8
8
|
## Server game ports
|
9
9
|
|
10
|
-
5843 port for fetch crossdomain.xml
|
11
|
-
|
12
10
|
5001 port for connect flash clients
|
13
11
|
5002 port for connect js clients
|
14
12
|
5102 secure port for connect js clients
|
15
13
|
5003 port for connect unity clients
|
16
14
|
|
17
15
|
## Auth ports
|
18
|
-
6843 port for fetch crossdomain.xml
|
19
16
|
|
20
17
|
6010 port for games servers
|
21
18
|
|
@@ -27,16 +24,12 @@ TODO: Write a gem description
|
|
27
24
|
|
28
25
|
## Server game ports
|
29
26
|
|
30
|
-
843 port for fetch crossdomain.xml
|
31
|
-
|
32
27
|
5001 port for connect flash clients
|
33
28
|
5002 port for connect js clients
|
34
29
|
5102 secure port for connect js clients
|
35
30
|
5003 port for connect unity clients
|
36
31
|
|
37
32
|
## Auth ports
|
38
|
-
843 port for fetch crossdomain.xml
|
39
|
-
|
40
33
|
6010 port for games servers
|
41
34
|
|
42
35
|
6002 port for connect js clients
|
@@ -14,12 +14,6 @@ class ManagerRemoteSocketFlash < ManagerRemoteSocketBase
|
|
14
14
|
# Events
|
15
15
|
#
|
16
16
|
|
17
|
-
public
|
18
|
-
def on_client_request_policy(session)
|
19
|
-
session.send_data(@policy)
|
20
|
-
session.close_connection_after_writing
|
21
|
-
end
|
22
|
-
|
23
17
|
#
|
24
18
|
# Methods
|
25
19
|
#
|
@@ -27,8 +21,6 @@ class ManagerRemoteSocketFlash < ManagerRemoteSocketBase
|
|
27
21
|
# default constructor
|
28
22
|
def initialize
|
29
23
|
super
|
30
|
-
|
31
|
-
@policy = File.open('public/crossdomain.xml', 'rb').read
|
32
24
|
end
|
33
25
|
|
34
26
|
protected
|
@@ -44,8 +36,6 @@ class ManagerRemoteSocketFlash < ManagerRemoteSocketBase
|
|
44
36
|
super
|
45
37
|
|
46
38
|
start_server_on_port(Constants::REMOTE_PORT_FLASH, SocketClientFlash, callback)
|
47
|
-
|
48
|
-
start_server_on_port(Constants::REMOTE_PORT_FLASH_CROSSDOMAIN, SocketClientCrossdomain, false)
|
49
39
|
end
|
50
40
|
|
51
41
|
end
|
@@ -19,12 +19,6 @@ class ManagerRemoteSocketUnity < ManagerRemoteSocketBase
|
|
19
19
|
# Events
|
20
20
|
#
|
21
21
|
|
22
|
-
public
|
23
|
-
def on_client_request_policy(session)
|
24
|
-
session.send_data(@policy)
|
25
|
-
session.close_connection_after_writing
|
26
|
-
end
|
27
|
-
|
28
22
|
#
|
29
23
|
# Methods
|
30
24
|
#
|
@@ -32,8 +26,6 @@ class ManagerRemoteSocketUnity < ManagerRemoteSocketBase
|
|
32
26
|
# default constructor
|
33
27
|
def initialize
|
34
28
|
super
|
35
|
-
|
36
|
-
@policy = File.open('public/crossdomain.xml', 'rb').read
|
37
29
|
end
|
38
30
|
|
39
31
|
protected
|
@@ -50,8 +42,6 @@ class ManagerRemoteSocketUnity < ManagerRemoteSocketBase
|
|
50
42
|
|
51
43
|
start_server_on_port(Constants::REMOTE_PORT_UNITY, self.class_client, callback)
|
52
44
|
|
53
|
-
start_server_on_port(Constants::REMOTE_PORT_UNITY_CROSSDOMAIN, SocketClientCrossdomain, false)
|
54
|
-
|
55
45
|
nil
|
56
46
|
end
|
57
47
|
|
data/mrpin-sdk.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'mrpin-sdk'
|
7
|
-
spec.version = '1.0.
|
7
|
+
spec.version = '1.0.55'
|
8
8
|
spec.authors = %w(Gregory Tkach Yakupov Dmitrij)
|
9
9
|
spec.email = %w(gregory.tkach@gmail.com yakupov.dmitrij@gmail.com)
|
10
10
|
spec.description = %q{Mrpin sdk for backend development.}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mrpin-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.55
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-04-
|
14
|
+
date: 2017-04-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -412,14 +412,12 @@ files:
|
|
412
412
|
- lib/mrpin/core/remote/socket/base/extensions/network_interface_helper.rb
|
413
413
|
- lib/mrpin/core/remote/socket/base/manager_remote_socket_base.rb
|
414
414
|
- lib/mrpin/core/remote/socket/base/socket_client_base.rb
|
415
|
-
- lib/mrpin/core/remote/socket/base/socket_client_crossdomain.rb
|
416
415
|
- lib/mrpin/core/remote/socket/flash/manager_remote_socket_flash.rb
|
417
416
|
- lib/mrpin/core/remote/socket/flash/socket_client_flash.rb
|
418
417
|
- lib/mrpin/core/remote/socket/unity/manager_remote_socket_unity.rb
|
419
418
|
- lib/mrpin/core/remote/socket/unity/socket_client_unity.rb
|
420
419
|
- lib/mrpin/core/remote/socket/websocket/manager_remote_web_sockets.rb
|
421
420
|
- lib/mrpin/core/remote/socket/websocket/socket_client_web_sockets.rb
|
422
|
-
- lib/mrpin/core/remote/socket/with_policy/socket_client_with_policy.rb
|
423
421
|
- lib/mrpin/core/review.rb
|
424
422
|
- lib/mrpin/core/scheduler/manager_scheduler.rb
|
425
423
|
- lib/mrpin/core/statistic/error_client_base.rb
|
@@ -1,33 +0,0 @@
|
|
1
|
-
class SocketClientCrossdomain < EM::Connection
|
2
|
-
|
3
|
-
#
|
4
|
-
# Properties
|
5
|
-
#
|
6
|
-
|
7
|
-
public
|
8
|
-
def self.manager_remote=(value)
|
9
|
-
@manager_remote = value
|
10
|
-
end
|
11
|
-
|
12
|
-
public
|
13
|
-
def self.manager_remote
|
14
|
-
@manager_remote
|
15
|
-
end
|
16
|
-
|
17
|
-
#
|
18
|
-
# Methods
|
19
|
-
#
|
20
|
-
|
21
|
-
public
|
22
|
-
def post_init
|
23
|
-
@manager_remote = self.class.manager_remote
|
24
|
-
end
|
25
|
-
|
26
|
-
public
|
27
|
-
def receive_data(data)
|
28
|
-
@manager_remote.on_client_request_policy(self)
|
29
|
-
|
30
|
-
AppInfo.instance.logger.info 'use 843 port for crossdomain.xml'
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
class SocketClientWithPolicy
|
2
|
-
|
3
|
-
#
|
4
|
-
# properties
|
5
|
-
#
|
6
|
-
|
7
|
-
#
|
8
|
-
# methods
|
9
|
-
#
|
10
|
-
|
11
|
-
public
|
12
|
-
def initialize
|
13
|
-
@policy_was_sent = false
|
14
|
-
|
15
|
-
@policy_regexp = '<policy_request_stub>'
|
16
|
-
end
|
17
|
-
|
18
|
-
public
|
19
|
-
def get_requests
|
20
|
-
result = []
|
21
|
-
|
22
|
-
return result unless @is_online
|
23
|
-
|
24
|
-
@requests_locker.synchronize do
|
25
|
-
begin
|
26
|
-
|
27
|
-
unless @data_buffer.empty?
|
28
|
-
|
29
|
-
deserialize_data = AMF::Root.deserialize(@data_buffer)
|
30
|
-
result = deserialize_data[:objects]
|
31
|
-
@data_buffer = deserialize_data[:incomplete_objects] || ''
|
32
|
-
|
33
|
-
if result.empty?
|
34
|
-
try_send_policy
|
35
|
-
elsif !@policy_was_sent
|
36
|
-
@policy_was_sent = true
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
rescue Exception => e
|
41
|
-
on_get_requests_error(e)
|
42
|
-
end #begin/rescue
|
43
|
-
end #synchronize
|
44
|
-
|
45
|
-
result
|
46
|
-
end
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
protected
|
51
|
-
def try_send_policy
|
52
|
-
#do nothing
|
53
|
-
return if @policy_was_sent
|
54
|
-
|
55
|
-
unless @policy_regexp.match(@data_buffer).nil?
|
56
|
-
@manager_remote.on_client_request_policy(self) unless @manager_remote.nil?
|
57
|
-
|
58
|
-
@data_buffer = ''
|
59
|
-
|
60
|
-
@policy_was_sent = true
|
61
|
-
end
|
62
|
-
|
63
|
-
nil
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|