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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac02dfbbdf4f05336522f09c88857a122c35821d
4
- data.tar.gz: 6ec1e772952f738b8d17e93d15788e934ffcf665
3
+ metadata.gz: 27ee21f3ac6b04119621a1ccafc43da3a285465a
4
+ data.tar.gz: 2f145a46ec4de7b4034e807458813b8def7f8de8
5
5
  SHA512:
6
- metadata.gz: 831d6e39b2cfd52d25c6cf39d2aba188f29767b21d203d2f8ee22cf945c44750f9617d382b9db6eab58d902c366c3d03761b420a4aed270cb32d1db2683555c9
7
- data.tar.gz: b619fb4e206c79bf70c91950950d62c9fe64deb18014016ca959c0bda60bf99442beda9ef07ab2a1931b832333304f4da1ad2cc445dc2574299cf928579f97a3
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
- @thread.join
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
- handle = WinSock.WSASocketA(Socket::AF_INET, Socket::SOCK_DGRAM, Socket::IPPROTO_UDP, nil, 0, 1)
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
@@ -1,3 +1,3 @@
1
1
  module ServerEngine
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
@@ -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) + '/msvcr*ruby*.dll'
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
 
@@ -65,6 +65,10 @@ describe ServerEngine::SocketManager do
65
65
  end
66
66
 
67
67
  else
68
+ let(:test_port) do
69
+ 9102
70
+ end
71
+
68
72
  it 'is unix' do
69
73
  SocketManager::Client.is_a?(SocketManagerUnix::ClientModule)
70
74
  SocketManager::Server.is_a?(SocketManagerUnix::ServerModule)
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.2
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-14 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sigdump