serverengine 1.6.2 → 1.6.3
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/Changelog +7 -0
- data/lib/serverengine/socket_manager.rb +3 -0
- data/lib/serverengine/socket_manager_unix.rb +2 -1
- data/lib/serverengine/socket_manager_win.rb +6 -1
- data/lib/serverengine/version.rb +1 -1
- data/lib/serverengine/winsock.rb +1 -1
- data/spec/socket_manager_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27ee21f3ac6b04119621a1ccafc43da3a285465a
|
4
|
+
data.tar.gz: 2f145a46ec4de7b4034e807458813b8def7f8de8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b88fe6bcebd72115a8d9c4c58296a831e39625fc763e2ed09a359674dfe1d849fa1ab7c14d732870bfd6b67183dccdc9acf72f2d1506c7bd8675a708376ebd6
|
7
|
+
data.tar.gz: e660e7a7900db257d0022e441cc414bbbd0c6388a3f05c35b51190c1c1e14cbe5e9d84660cc957cef52c4f9c348e6d38e4c9608f2cff35260ff1c93ae4585c97
|
data/Changelog
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
2016-04-27 version 1.6.3:
|
2
|
+
|
3
|
+
* Fix Socket Manager for UDP to adapt to ipv6
|
4
|
+
* Fix Socket Manager not to join thread in Ruby 2.1
|
5
|
+
* Fix Socket Manager to identify all localhost address
|
6
|
+
* Fix ruby dll path on Ruby x64
|
7
|
+
|
1
8
|
2016-04-14 version 1.6.2:
|
2
9
|
|
3
10
|
* Fix to use Etc instead of id command in change_privilege for windows
|
@@ -124,6 +124,9 @@ module ServerEngine
|
|
124
124
|
return "[#{bind_ip}]:#{port}", bind_ip
|
125
125
|
else
|
126
126
|
# assuming ipv4
|
127
|
+
if bind_ip == "127.0.0.1" or bind_ip == "0.0.0.0"
|
128
|
+
return "localhost:#{port}", bind_ip
|
129
|
+
end
|
127
130
|
return "#{bind_ip}:#{port}", bind_ip
|
128
131
|
end
|
129
132
|
end
|
@@ -80,7 +80,8 @@ module ServerEngine
|
|
80
80
|
@tcp_sockets.reject! {|key,lsock| lsock.close; true }
|
81
81
|
@udp_sockets.reject! {|key,usock| usock.close; true }
|
82
82
|
@server.close unless @server.closed?
|
83
|
-
|
83
|
+
# It cause dead lock and can't finish when joining thread using Ruby 2.1 on linux.
|
84
|
+
@thread.join if RUBY_VERSION >= "2.2"
|
84
85
|
end
|
85
86
|
|
86
87
|
def send_socket(peer, pid, method, bind, port)
|
@@ -78,7 +78,12 @@ module ServerEngine
|
|
78
78
|
def listen_udp_new(bind_ip, port)
|
79
79
|
sock_addr = Socket.pack_sockaddr_in(port, bind_ip.to_s)
|
80
80
|
|
81
|
-
|
81
|
+
if IPAddr.new(IPSocket.getaddress(bind_ip.to_s)).ipv4?
|
82
|
+
handle = WinSock.WSASocketA(Socket::AF_INET, Socket::SOCK_DGRAM, Socket::IPPROTO_UDP, nil, 0, 1)
|
83
|
+
else
|
84
|
+
handle = WinSock.WSASocketA(Socket::AF_INET6, Socket::SOCK_DGRAM, Socket::IPPROTO_UDP, nil, 0, 1)
|
85
|
+
end
|
86
|
+
|
82
87
|
if handle == WinSock::INVALID_SOCKET
|
83
88
|
RbWinSock.raise_last_error("WSASocketA(2)")
|
84
89
|
end
|
data/lib/serverengine/version.rb
CHANGED
data/lib/serverengine/winsock.rb
CHANGED
@@ -92,7 +92,7 @@ module ServerEngine
|
|
92
92
|
GetModuleFileNameA(0, ruby_bin_path_buf, ruby_bin_path_buf.size)
|
93
93
|
|
94
94
|
ruby_bin_path = ruby_bin_path_buf.to_s.gsub(/\\/, '/')
|
95
|
-
ruby_dll_paths = File.dirname(ruby_bin_path) + '
|
95
|
+
ruby_dll_paths = File.dirname(ruby_bin_path) + '/*msvcr*ruby*.dll'
|
96
96
|
ruby_dll_path = Dir.glob(ruby_dll_paths).first
|
97
97
|
dlload ruby_dll_path
|
98
98
|
|
data/spec/socket_manager_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sigdump
|