zeroc-ice 3.7.9.1 → 3.7.11

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.
Files changed (994) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Connection.cpp +536 -0
  3. data/dist/IceRuby/Endpoint.cpp +344 -0
  4. data/dist/IceRuby/ImplicitContext.cpp +148 -0
  5. data/dist/IceRuby/Logger.cpp +151 -0
  6. data/dist/IceRuby/Operation.cpp +665 -0
  7. data/dist/IceRuby/Properties.cpp +369 -0
  8. data/dist/IceRuby/Types.cpp +3336 -0
  9. data/dist/IceRuby/Types.h +604 -0
  10. data/dist/IceRuby/ValueFactoryManager.cpp +445 -0
  11. data/dist/ice/cpp/include/Ice/Config.h +76 -0
  12. data/dist/ice/cpp/include/Ice/ConsoleUtil.h +23 -0
  13. data/dist/ice/cpp/include/Ice/ExceptionHelpers.h +74 -0
  14. data/dist/ice/cpp/include/Ice/Ice.h +55 -0
  15. data/dist/ice/cpp/include/Ice/Initialize.h +957 -0
  16. data/dist/ice/cpp/include/Ice/MetricsObserverI.h +669 -0
  17. data/dist/ice/cpp/include/Ice/OutgoingAsync.h +868 -0
  18. data/dist/ice/cpp/include/Ice/Proxy.h +5171 -0
  19. data/dist/ice/cpp/include/Ice/SHA1.h +40 -0
  20. data/dist/ice/cpp/include/Ice/UserExceptionFactory.h +90 -0
  21. data/dist/ice/cpp/include/IceDiscovery/IceDiscovery.h +1889 -0
  22. data/dist/ice/cpp/include/IceLocatorDiscovery/IceLocatorDiscovery.h +1197 -0
  23. data/dist/ice/cpp/include/IceSSL/IceSSL.h +24 -0
  24. data/dist/ice/cpp/include/IceUtil/Cond.h +317 -0
  25. data/dist/ice/cpp/include/IceUtil/Config.h +392 -0
  26. data/dist/ice/cpp/include/IceUtil/ConsoleUtil.h +92 -0
  27. data/dist/ice/cpp/include/IceUtil/CtrlCHandler.h +96 -0
  28. data/dist/ice/cpp/include/IceUtil/FileUtil.h +140 -0
  29. data/dist/ice/cpp/include/IceUtil/IceUtil.h +40 -0
  30. data/dist/ice/cpp/include/IceUtil/InputUtil.h +42 -0
  31. data/dist/ice/cpp/include/IceUtil/Mutex.h +349 -0
  32. data/dist/ice/cpp/include/IceUtil/ResourceConfig.h +37 -0
  33. data/dist/ice/cpp/include/IceUtil/Thread.h +160 -0
  34. data/dist/ice/cpp/include/IceUtil/Timer.h +153 -0
  35. data/dist/ice/cpp/include/generated/Glacier2/Metrics.h +475 -0
  36. data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifier.h +1430 -0
  37. data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifierF.h +147 -0
  38. data/dist/ice/cpp/include/generated/Glacier2/Router.h +3260 -0
  39. data/dist/ice/cpp/include/generated/Glacier2/RouterF.h +125 -0
  40. data/dist/ice/cpp/include/generated/Glacier2/SSLInfo.h +223 -0
  41. data/dist/ice/cpp/include/generated/Glacier2/Session.h +5894 -0
  42. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +170 -0
  43. data/dist/ice/cpp/include/generated/Ice/Communicator.h +1162 -0
  44. data/dist/ice/cpp/include/generated/Ice/CommunicatorF.h +101 -0
  45. data/dist/ice/cpp/include/generated/Ice/Connection.h +1703 -0
  46. data/dist/ice/cpp/include/generated/Ice/ConnectionF.h +119 -0
  47. data/dist/ice/cpp/include/generated/Ice/Current.h +322 -0
  48. data/dist/ice/cpp/include/generated/Ice/Endpoint.h +979 -0
  49. data/dist/ice/cpp/include/generated/Ice/EndpointF.h +166 -0
  50. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +118 -0
  51. data/dist/ice/cpp/include/generated/Ice/FacetMap.h +80 -0
  52. data/dist/ice/cpp/include/generated/Ice/Identity.h +264 -0
  53. data/dist/ice/cpp/include/generated/Ice/ImplicitContext.h +284 -0
  54. data/dist/ice/cpp/include/generated/Ice/ImplicitContextF.h +101 -0
  55. data/dist/ice/cpp/include/generated/Ice/Instrumentation.h +1203 -0
  56. data/dist/ice/cpp/include/generated/Ice/InstrumentationF.h +128 -0
  57. data/dist/ice/cpp/include/generated/Ice/LocalException.h +7437 -0
  58. data/dist/ice/cpp/include/generated/Ice/Locator.h +3898 -0
  59. data/dist/ice/cpp/include/generated/Ice/LocatorF.h +147 -0
  60. data/dist/ice/cpp/include/generated/Ice/Logger.h +237 -0
  61. data/dist/ice/cpp/include/generated/Ice/LoggerF.h +101 -0
  62. data/dist/ice/cpp/include/generated/Ice/Metrics.h +4769 -0
  63. data/dist/ice/cpp/include/generated/Ice/ObjectAdapter.h +1181 -0
  64. data/dist/ice/cpp/include/generated/Ice/ObjectAdapterF.h +101 -0
  65. data/dist/ice/cpp/include/generated/Ice/ObjectFactory.h +203 -0
  66. data/dist/ice/cpp/include/generated/Ice/Plugin.h +318 -0
  67. data/dist/ice/cpp/include/generated/Ice/PluginF.h +110 -0
  68. data/dist/ice/cpp/include/generated/Ice/Process.h +977 -0
  69. data/dist/ice/cpp/include/generated/Ice/ProcessF.h +125 -0
  70. data/dist/ice/cpp/include/generated/Ice/Properties.h +452 -0
  71. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +1366 -0
  72. data/dist/ice/cpp/include/generated/Ice/PropertiesF.h +134 -0
  73. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +2707 -0
  74. data/dist/ice/cpp/include/generated/Ice/Router.h +1850 -0
  75. data/dist/ice/cpp/include/generated/Ice/RouterF.h +125 -0
  76. data/dist/ice/cpp/include/generated/Ice/ServantLocator.h +305 -0
  77. data/dist/ice/cpp/include/generated/Ice/ServantLocatorF.h +101 -0
  78. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +84 -0
  79. data/dist/ice/cpp/include/generated/Ice/ValueFactory.h +330 -0
  80. data/dist/ice/cpp/include/generated/Ice/Version.h +357 -0
  81. data/dist/ice/cpp/include/generated/IceBox/IceBox.h +3269 -0
  82. data/dist/ice/cpp/include/generated/IceGrid/Admin.h +33773 -0
  83. data/dist/ice/cpp/include/generated/IceGrid/Descriptor.h +5254 -0
  84. data/dist/ice/cpp/include/generated/IceGrid/Exception.h +2834 -0
  85. data/dist/ice/cpp/include/generated/IceGrid/FileParser.h +824 -0
  86. data/dist/ice/cpp/include/generated/IceGrid/PluginFacade.h +635 -0
  87. data/dist/ice/cpp/include/generated/IceGrid/Registry.h +5089 -0
  88. data/dist/ice/cpp/include/generated/IceGrid/Session.h +2240 -0
  89. data/dist/ice/cpp/include/generated/IceGrid/UserAccountMapper.h +800 -0
  90. data/dist/ice/cpp/include/generated/IcePatch2/FileInfo.h +325 -0
  91. data/dist/ice/cpp/include/generated/IcePatch2/FileServer.h +2891 -0
  92. data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +228 -0
  93. data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +101 -0
  94. data/dist/ice/cpp/include/generated/IceSSL/EndpointInfo.h +186 -0
  95. data/dist/ice/cpp/include/generated/IceStorm/IceStorm.h +6627 -0
  96. data/dist/ice/cpp/include/generated/IceStorm/Metrics.h +665 -0
  97. data/dist/ice/cpp/src/Ice/Acceptor.h +37 -0
  98. data/dist/ice/cpp/src/Ice/Application.cpp +661 -0
  99. data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +1972 -0
  100. data/dist/ice/cpp/src/Ice/ConnectionFactory.h +264 -0
  101. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +3670 -0
  102. data/dist/ice/cpp/src/Ice/ConnectionI.h +389 -0
  103. data/dist/ice/cpp/src/Ice/CountDownLatch.cpp +171 -0
  104. data/dist/ice/cpp/src/Ice/DLLMain.cpp +50 -0
  105. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +159 -0
  106. data/dist/ice/cpp/src/Ice/DynamicLibrary.cpp +284 -0
  107. data/dist/ice/cpp/src/Ice/EndpointFactory.cpp +189 -0
  108. data/dist/ice/cpp/src/Ice/EndpointI.cpp +98 -0
  109. data/dist/ice/cpp/src/Ice/EventHandler.cpp +32 -0
  110. data/dist/ice/cpp/src/Ice/EventHandler.h +81 -0
  111. data/dist/ice/cpp/src/Ice/Exception.cpp +818 -0
  112. data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +710 -0
  113. data/dist/ice/cpp/src/Ice/IPEndpointI.h +152 -0
  114. data/dist/ice/cpp/src/Ice/InputStream.cpp +2741 -0
  115. data/dist/ice/cpp/src/Ice/Instance.cpp +1967 -0
  116. data/dist/ice/cpp/src/Ice/LoggerI.cpp +259 -0
  117. data/dist/ice/cpp/src/Ice/MetricsAdminI.cpp +694 -0
  118. data/dist/ice/cpp/src/Ice/Network.cpp +2249 -0
  119. data/dist/ice/cpp/src/Ice/Network.h +289 -0
  120. data/dist/ice/cpp/src/Ice/NetworkF.h +19 -0
  121. data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +311 -0
  122. data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +1530 -0
  123. data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1322 -0
  124. data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +503 -0
  125. data/dist/ice/cpp/src/Ice/PropertiesI.cpp +739 -0
  126. data/dist/ice/cpp/src/Ice/PropertyNames.cpp +1428 -0
  127. data/dist/ice/cpp/src/Ice/PropertyNames.h +78 -0
  128. data/dist/ice/cpp/src/Ice/Proxy.cpp +1604 -0
  129. data/dist/ice/cpp/src/Ice/SHA1.cpp +169 -0
  130. data/dist/ice/cpp/src/Ice/Selector.cpp +1535 -0
  131. data/dist/ice/cpp/src/Ice/Selector.h +292 -0
  132. data/dist/ice/cpp/src/Ice/Service.cpp +1883 -0
  133. data/dist/ice/cpp/src/Ice/StreamSocket.cpp +519 -0
  134. data/dist/ice/cpp/src/Ice/StreamSocket.h +85 -0
  135. data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +234 -0
  136. data/dist/ice/cpp/src/Ice/TcpAcceptor.h +61 -0
  137. data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +135 -0
  138. data/dist/ice/cpp/src/Ice/TcpTransceiver.h +58 -0
  139. data/dist/ice/cpp/src/Ice/Thread.cpp +569 -0
  140. data/dist/ice/cpp/src/Ice/ThreadPool.cpp +1292 -0
  141. data/dist/ice/cpp/src/Ice/ThreadPool.h +393 -0
  142. data/dist/ice/cpp/src/Ice/Transceiver.h +49 -0
  143. data/dist/ice/cpp/src/Ice/UdpConnector.cpp +131 -0
  144. data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +806 -0
  145. data/dist/ice/cpp/src/Ice/UdpTransceiver.h +96 -0
  146. data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +92 -0
  147. data/dist/ice/cpp/src/Ice/WSAcceptor.h +52 -0
  148. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +1704 -0
  149. data/dist/ice/cpp/src/Ice/WSTransceiver.h +141 -0
  150. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +49 -0
  151. data/dist/ice/cpp/src/Ice/generated/Communicator.cpp +79 -0
  152. data/dist/ice/cpp/src/Ice/generated/CommunicatorF.cpp +61 -0
  153. data/dist/ice/cpp/src/Ice/generated/Connection.cpp +155 -0
  154. data/dist/ice/cpp/src/Ice/generated/ConnectionF.cpp +61 -0
  155. data/dist/ice/cpp/src/Ice/generated/Current.cpp +62 -0
  156. data/dist/ice/cpp/src/Ice/generated/Endpoint.cpp +147 -0
  157. data/dist/ice/cpp/src/Ice/generated/EndpointF.cpp +61 -0
  158. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +51 -0
  159. data/dist/ice/cpp/src/Ice/generated/FacetMap.cpp +49 -0
  160. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +57 -0
  161. data/dist/ice/cpp/src/Ice/generated/ImplicitContext.cpp +75 -0
  162. data/dist/ice/cpp/src/Ice/generated/ImplicitContextF.cpp +61 -0
  163. data/dist/ice/cpp/src/Ice/generated/Instrumentation.cpp +188 -0
  164. data/dist/ice/cpp/src/Ice/generated/InstrumentationF.cpp +66 -0
  165. data/dist/ice/cpp/src/Ice/generated/LocalException.cpp +3262 -0
  166. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2042 -0
  167. data/dist/ice/cpp/src/Ice/generated/LocatorF.cpp +63 -0
  168. data/dist/ice/cpp/src/Ice/generated/Logger.cpp +73 -0
  169. data/dist/ice/cpp/src/Ice/generated/LoggerF.cpp +61 -0
  170. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2352 -0
  171. data/dist/ice/cpp/src/Ice/generated/ObjectAdapter.cpp +79 -0
  172. data/dist/ice/cpp/src/Ice/generated/ObjectAdapterF.cpp +61 -0
  173. data/dist/ice/cpp/src/Ice/generated/ObjectFactory.cpp +75 -0
  174. data/dist/ice/cpp/src/Ice/generated/Plugin.cpp +87 -0
  175. data/dist/ice/cpp/src/Ice/generated/PluginF.cpp +61 -0
  176. data/dist/ice/cpp/src/Ice/generated/Process.cpp +471 -0
  177. data/dist/ice/cpp/src/Ice/generated/ProcessF.cpp +63 -0
  178. data/dist/ice/cpp/src/Ice/generated/Properties.cpp +78 -0
  179. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +603 -0
  180. data/dist/ice/cpp/src/Ice/generated/PropertiesF.cpp +63 -0
  181. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +1171 -0
  182. data/dist/ice/cpp/src/Ice/generated/Router.cpp +977 -0
  183. data/dist/ice/cpp/src/Ice/generated/RouterF.cpp +63 -0
  184. data/dist/ice/cpp/src/Ice/generated/ServantLocator.cpp +75 -0
  185. data/dist/ice/cpp/src/Ice/generated/ServantLocatorF.cpp +61 -0
  186. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +49 -0
  187. data/dist/ice/cpp/src/Ice/generated/ValueFactory.cpp +83 -0
  188. data/dist/ice/cpp/src/Ice/generated/Version.cpp +57 -0
  189. data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.cpp +154 -0
  190. data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.h +49 -0
  191. data/dist/ice/cpp/src/Ice/ios/StreamConnector.cpp +146 -0
  192. data/dist/ice/cpp/src/Ice/ios/StreamConnector.h +52 -0
  193. data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.cpp +477 -0
  194. data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.h +156 -0
  195. data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.cpp +570 -0
  196. data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.h +93 -0
  197. data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery/IceDiscovery.h +1889 -0
  198. data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery.cpp +915 -0
  199. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery/IceLocatorDiscovery.h +1197 -0
  200. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery.cpp +730 -0
  201. data/dist/ice/cpp/src/IceSSL/AcceptorI.cpp +105 -0
  202. data/dist/ice/cpp/src/IceSSL/AcceptorI.h +52 -0
  203. data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +1092 -0
  204. data/dist/ice/cpp/src/IceSSL/PluginI.cpp +246 -0
  205. data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +719 -0
  206. data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +868 -0
  207. data/dist/ice/cpp/src/IceSSL/Util.cpp +192 -0
  208. data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfo.cpp +75 -0
  209. data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfoF.cpp +61 -0
  210. data/dist/ice/cpp/src/IceSSL/generated/EndpointInfo.cpp +75 -0
  211. data/dist/ice/cpp/src/IceUtil/ConsoleUtil.cpp +157 -0
  212. data/dist/ice/cpp/src/IceUtil/FileUtil.cpp +471 -0
  213. data/dist/ice/cpp/src/IceUtil/RecMutex.cpp +238 -0
  214. data/dist/ice/cpp/src/IceUtil/StringConverter.cpp +690 -0
  215. data/dist/ice/cpp/src/IceUtil/StringUtil.cpp +1135 -0
  216. data/dist/ice/cpp/src/IceUtil/UUID.cpp +165 -0
  217. data/dist/ice/cpp/src/IceUtil/UtilException.cpp +839 -0
  218. data/dist/ice/cpp/src/Slice/JavaUtil.cpp +5183 -0
  219. data/dist/ice/cpp/src/Slice/JavaUtil.h +407 -0
  220. data/dist/ice/cpp/src/slice2rb/Main.cpp +35 -0
  221. data/dist/ice/mcpp/directive.c +1407 -0
  222. data/dist/ice/mcpp/internal.H +530 -0
  223. data/dist/ice/mcpp/mcpp_main.c +792 -0
  224. data/dist/ice/mcpp/support.c +1985 -0
  225. data/dist/ice/mcpp/system.c +2741 -0
  226. data/dist/ice/slice/Ice/Connection.ice +516 -0
  227. data/dist/ice/slice/Ice/Current.ice +170 -0
  228. data/dist/ice/slice/Ice/Locator.ice +239 -0
  229. data/dist/ice/slice/Ice/Metrics.ice +436 -0
  230. data/dist/ice/slice/Ice/ObjectAdapter.ice +710 -0
  231. data/dist/ice/slice/Ice/Properties.ice +244 -0
  232. data/dist/ice/slice/Ice/Router.ice +103 -0
  233. data/dist/ice/slice/IceGrid/PluginFacade.ice +329 -0
  234. data/dist/ice/slice/IceStorm/IceStorm.ice +414 -0
  235. data/dist/lib/Glacier2/Metrics.rb +56 -0
  236. data/dist/lib/Glacier2/PermissionsVerifier.rb +93 -0
  237. data/dist/lib/Glacier2/PermissionsVerifierF.rb +30 -0
  238. data/dist/lib/Glacier2/Router.rb +95 -0
  239. data/dist/lib/Glacier2/RouterF.rb +25 -0
  240. data/dist/lib/Glacier2/SSLInfo.rb +72 -0
  241. data/dist/lib/Glacier2/Session.rb +247 -0
  242. data/dist/lib/Ice/BuiltinSequences.rb +60 -0
  243. data/dist/lib/Ice/Communicator.rb +87 -0
  244. data/dist/lib/Ice/CommunicatorF.rb +24 -0
  245. data/dist/lib/Ice/Connection.rb +413 -0
  246. data/dist/lib/Ice/ConnectionF.rb +32 -0
  247. data/dist/lib/Ice/Current.rb +141 -0
  248. data/dist/lib/Ice/Endpoint.rb +187 -0
  249. data/dist/lib/Ice/EndpointF.rb +48 -0
  250. data/dist/lib/Ice/EndpointTypes.rb +69 -0
  251. data/dist/lib/Ice/FacetMap.rb +24 -0
  252. data/dist/lib/Ice/Identity.rb +63 -0
  253. data/dist/lib/Ice/ImplicitContext.rb +26 -0
  254. data/dist/lib/Ice/ImplicitContextF.rb +24 -0
  255. data/dist/lib/Ice/Instrumentation.rb +169 -0
  256. data/dist/lib/Ice/InstrumentationF.rb +31 -0
  257. data/dist/lib/Ice/LocalException.rb +1031 -0
  258. data/dist/lib/Ice/Locator.rb +196 -0
  259. data/dist/lib/Ice/LocatorF.rb +30 -0
  260. data/dist/lib/Ice/Logger.rb +24 -0
  261. data/dist/lib/Ice/LoggerF.rb +24 -0
  262. data/dist/lib/Ice/Metrics.rb +337 -0
  263. data/dist/lib/Ice/ObjectAdapter.rb +29 -0
  264. data/dist/lib/Ice/ObjectAdapterF.rb +24 -0
  265. data/dist/lib/Ice/ObjectFactory.rb +24 -0
  266. data/dist/lib/Ice/Plugin.rb +30 -0
  267. data/dist/lib/Ice/PluginF.rb +28 -0
  268. data/dist/lib/Ice/Process.rb +53 -0
  269. data/dist/lib/Ice/ProcessF.rb +25 -0
  270. data/dist/lib/Ice/Properties.rb +25 -0
  271. data/dist/lib/Ice/PropertiesAdmin.rb +63 -0
  272. data/dist/lib/Ice/PropertiesF.rb +29 -0
  273. data/dist/lib/Ice/RemoteLogger.rb +207 -0
  274. data/dist/lib/Ice/Router.rb +87 -0
  275. data/dist/lib/Ice/RouterF.rb +25 -0
  276. data/dist/lib/Ice/ServantLocator.rb +26 -0
  277. data/dist/lib/Ice/ServantLocatorF.rb +24 -0
  278. data/dist/lib/Ice/SliceChecksumDict.rb +24 -0
  279. data/dist/lib/Ice/ValueFactory.rb +28 -0
  280. data/dist/lib/Ice/Version.rb +90 -0
  281. data/dist/lib/IceBox/IceBox.rb +164 -0
  282. data/dist/lib/IceGrid/Admin.rb +1196 -0
  283. data/dist/lib/IceGrid/Descriptor.rb +1034 -0
  284. data/dist/lib/IceGrid/Exception.rb +376 -0
  285. data/dist/lib/IceGrid/FileParser.rb +65 -0
  286. data/dist/lib/IceGrid/PluginFacade.rb +35 -0
  287. data/dist/lib/IceGrid/Registry.rb +209 -0
  288. data/dist/lib/IceGrid/Session.rb +71 -0
  289. data/dist/lib/IceGrid/UserAccountMapper.rb +61 -0
  290. data/dist/lib/IcePatch2/FileInfo.rb +115 -0
  291. data/dist/lib/IcePatch2/FileServer.rb +123 -0
  292. data/dist/lib/IceStorm/IceStorm.rb +332 -0
  293. data/dist/lib/IceStorm/Metrics.rb +73 -0
  294. data/extconf.rb +91 -0
  295. data/ice.gemspec +21 -16
  296. metadata +715 -711
  297. data/ICE_LICENSE +0 -48
  298. data/LICENSE +0 -340
  299. data/MCPP_LICENSE +0 -29
  300. data/ext/Connection.cpp +0 -532
  301. data/ext/Endpoint.cpp +0 -340
  302. data/ext/ImplicitContext.cpp +0 -144
  303. data/ext/Logger.cpp +0 -147
  304. data/ext/Operation.cpp +0 -661
  305. data/ext/Properties.cpp +0 -365
  306. data/ext/Types.cpp +0 -3325
  307. data/ext/Types.h +0 -595
  308. data/ext/ValueFactoryManager.cpp +0 -441
  309. data/ext/extconf.rb +0 -97
  310. data/ext/ice/cpp/include/Ice/Config.h +0 -78
  311. data/ext/ice/cpp/include/Ice/ConsoleUtil.h +0 -23
  312. data/ext/ice/cpp/include/Ice/ExceptionHelpers.h +0 -74
  313. data/ext/ice/cpp/include/Ice/Ice.h +0 -55
  314. data/ext/ice/cpp/include/Ice/Initialize.h +0 -957
  315. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +0 -669
  316. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +0 -856
  317. data/ext/ice/cpp/include/Ice/Proxy.h +0 -5154
  318. data/ext/ice/cpp/include/Ice/SHA1.h +0 -42
  319. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +0 -88
  320. data/ext/ice/cpp/include/IceSSL/IceSSL.h +0 -28
  321. data/ext/ice/cpp/include/IceSSL/UWP.h +0 -62
  322. data/ext/ice/cpp/include/IceUtil/Cond.h +0 -317
  323. data/ext/ice/cpp/include/IceUtil/Config.h +0 -424
  324. data/ext/ice/cpp/include/IceUtil/ConsoleUtil.h +0 -92
  325. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +0 -92
  326. data/ext/ice/cpp/include/IceUtil/FileUtil.h +0 -143
  327. data/ext/ice/cpp/include/IceUtil/IceUtil.h +0 -40
  328. data/ext/ice/cpp/include/IceUtil/InputUtil.h +0 -42
  329. data/ext/ice/cpp/include/IceUtil/Mutex.h +0 -353
  330. data/ext/ice/cpp/include/IceUtil/ResourceConfig.h +0 -53
  331. data/ext/ice/cpp/include/IceUtil/Thread.h +0 -174
  332. data/ext/ice/cpp/include/IceUtil/Timer.h +0 -143
  333. data/ext/ice/cpp/include/generated/Ice/BuiltinSequences.h +0 -170
  334. data/ext/ice/cpp/include/generated/Ice/Communicator.h +0 -1162
  335. data/ext/ice/cpp/include/generated/Ice/CommunicatorF.h +0 -101
  336. data/ext/ice/cpp/include/generated/Ice/Connection.h +0 -1703
  337. data/ext/ice/cpp/include/generated/Ice/ConnectionF.h +0 -119
  338. data/ext/ice/cpp/include/generated/Ice/Current.h +0 -322
  339. data/ext/ice/cpp/include/generated/Ice/Endpoint.h +0 -979
  340. data/ext/ice/cpp/include/generated/Ice/EndpointF.h +0 -166
  341. data/ext/ice/cpp/include/generated/Ice/EndpointTypes.h +0 -118
  342. data/ext/ice/cpp/include/generated/Ice/FacetMap.h +0 -80
  343. data/ext/ice/cpp/include/generated/Ice/Identity.h +0 -264
  344. data/ext/ice/cpp/include/generated/Ice/ImplicitContext.h +0 -284
  345. data/ext/ice/cpp/include/generated/Ice/ImplicitContextF.h +0 -101
  346. data/ext/ice/cpp/include/generated/Ice/Instrumentation.h +0 -1203
  347. data/ext/ice/cpp/include/generated/Ice/InstrumentationF.h +0 -128
  348. data/ext/ice/cpp/include/generated/Ice/LocalException.h +0 -7437
  349. data/ext/ice/cpp/include/generated/Ice/Locator.h +0 -3898
  350. data/ext/ice/cpp/include/generated/Ice/LocatorF.h +0 -147
  351. data/ext/ice/cpp/include/generated/Ice/Logger.h +0 -237
  352. data/ext/ice/cpp/include/generated/Ice/LoggerF.h +0 -101
  353. data/ext/ice/cpp/include/generated/Ice/Metrics.h +0 -4769
  354. data/ext/ice/cpp/include/generated/Ice/ObjectAdapter.h +0 -1181
  355. data/ext/ice/cpp/include/generated/Ice/ObjectAdapterF.h +0 -101
  356. data/ext/ice/cpp/include/generated/Ice/ObjectFactory.h +0 -203
  357. data/ext/ice/cpp/include/generated/Ice/Plugin.h +0 -318
  358. data/ext/ice/cpp/include/generated/Ice/PluginF.h +0 -110
  359. data/ext/ice/cpp/include/generated/Ice/Process.h +0 -977
  360. data/ext/ice/cpp/include/generated/Ice/ProcessF.h +0 -125
  361. data/ext/ice/cpp/include/generated/Ice/Properties.h +0 -452
  362. data/ext/ice/cpp/include/generated/Ice/PropertiesAdmin.h +0 -1366
  363. data/ext/ice/cpp/include/generated/Ice/PropertiesF.h +0 -134
  364. data/ext/ice/cpp/include/generated/Ice/RemoteLogger.h +0 -2707
  365. data/ext/ice/cpp/include/generated/Ice/Router.h +0 -1850
  366. data/ext/ice/cpp/include/generated/Ice/RouterF.h +0 -125
  367. data/ext/ice/cpp/include/generated/Ice/ServantLocator.h +0 -305
  368. data/ext/ice/cpp/include/generated/Ice/ServantLocatorF.h +0 -101
  369. data/ext/ice/cpp/include/generated/Ice/SliceChecksumDict.h +0 -84
  370. data/ext/ice/cpp/include/generated/Ice/ValueFactory.h +0 -330
  371. data/ext/ice/cpp/include/generated/Ice/Version.h +0 -357
  372. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +0 -228
  373. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +0 -101
  374. data/ext/ice/cpp/include/generated/IceSSL/EndpointInfo.h +0 -186
  375. data/ext/ice/cpp/src/Ice/Acceptor.h +0 -37
  376. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +0 -49
  377. data/ext/ice/cpp/src/Ice/Communicator.cpp +0 -79
  378. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +0 -61
  379. data/ext/ice/cpp/src/Ice/Connection.cpp +0 -155
  380. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +0 -61
  381. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +0 -1972
  382. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +0 -264
  383. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +0 -3670
  384. data/ext/ice/cpp/src/Ice/ConnectionI.h +0 -391
  385. data/ext/ice/cpp/src/Ice/CountDownLatch.cpp +0 -179
  386. data/ext/ice/cpp/src/Ice/Current.cpp +0 -62
  387. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +0 -161
  388. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +0 -291
  389. data/ext/ice/cpp/src/Ice/Endpoint.cpp +0 -147
  390. data/ext/ice/cpp/src/Ice/EndpointF.cpp +0 -61
  391. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +0 -189
  392. data/ext/ice/cpp/src/Ice/EndpointI.cpp +0 -98
  393. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +0 -51
  394. data/ext/ice/cpp/src/Ice/EventHandler.cpp +0 -32
  395. data/ext/ice/cpp/src/Ice/EventHandler.h +0 -81
  396. data/ext/ice/cpp/src/Ice/Exception.cpp +0 -845
  397. data/ext/ice/cpp/src/Ice/FacetMap.cpp +0 -49
  398. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +0 -756
  399. data/ext/ice/cpp/src/Ice/IPEndpointI.h +0 -162
  400. data/ext/ice/cpp/src/Ice/Identity.cpp +0 -57
  401. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +0 -75
  402. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +0 -61
  403. data/ext/ice/cpp/src/Ice/InputStream.cpp +0 -2741
  404. data/ext/ice/cpp/src/Ice/Instance.cpp +0 -1971
  405. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +0 -188
  406. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +0 -66
  407. data/ext/ice/cpp/src/Ice/LocalException.cpp +0 -3262
  408. data/ext/ice/cpp/src/Ice/Locator.cpp +0 -2042
  409. data/ext/ice/cpp/src/Ice/LocatorF.cpp +0 -63
  410. data/ext/ice/cpp/src/Ice/Logger.cpp +0 -73
  411. data/ext/ice/cpp/src/Ice/LoggerF.cpp +0 -61
  412. data/ext/ice/cpp/src/Ice/LoggerI.cpp +0 -261
  413. data/ext/ice/cpp/src/Ice/Metrics.cpp +0 -2352
  414. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +0 -694
  415. data/ext/ice/cpp/src/Ice/Network.cpp +0 -3075
  416. data/ext/ice/cpp/src/Ice/Network.h +0 -371
  417. data/ext/ice/cpp/src/Ice/NetworkF.h +0 -23
  418. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +0 -324
  419. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +0 -79
  420. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +0 -61
  421. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +0 -1530
  422. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +0 -75
  423. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +0 -1322
  424. data/ext/ice/cpp/src/Ice/Plugin.cpp +0 -87
  425. data/ext/ice/cpp/src/Ice/PluginF.cpp +0 -61
  426. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +0 -503
  427. data/ext/ice/cpp/src/Ice/Process.cpp +0 -471
  428. data/ext/ice/cpp/src/Ice/ProcessF.cpp +0 -63
  429. data/ext/ice/cpp/src/Ice/Properties.cpp +0 -78
  430. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +0 -603
  431. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +0 -63
  432. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +0 -747
  433. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +0 -1429
  434. data/ext/ice/cpp/src/Ice/PropertyNames.h +0 -78
  435. data/ext/ice/cpp/src/Ice/Proxy.cpp +0 -1601
  436. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +0 -1171
  437. data/ext/ice/cpp/src/Ice/Router.cpp +0 -977
  438. data/ext/ice/cpp/src/Ice/RouterF.cpp +0 -63
  439. data/ext/ice/cpp/src/Ice/SHA1.cpp +0 -185
  440. data/ext/ice/cpp/src/Ice/Selector.cpp +0 -1537
  441. data/ext/ice/cpp/src/Ice/Selector.h +0 -308
  442. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +0 -75
  443. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +0 -61
  444. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +0 -49
  445. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +0 -682
  446. data/ext/ice/cpp/src/Ice/StreamSocket.h +0 -92
  447. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +0 -355
  448. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +0 -69
  449. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +0 -135
  450. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +0 -58
  451. data/ext/ice/cpp/src/Ice/Thread.cpp +0 -811
  452. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +0 -1328
  453. data/ext/ice/cpp/src/Ice/ThreadPool.h +0 -393
  454. data/ext/ice/cpp/src/Ice/Transceiver.h +0 -49
  455. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +0 -136
  456. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +0 -1153
  457. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +0 -117
  458. data/ext/ice/cpp/src/Ice/ValueFactory.cpp +0 -83
  459. data/ext/ice/cpp/src/Ice/Version.cpp +0 -57
  460. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +0 -92
  461. data/ext/ice/cpp/src/Ice/WSAcceptor.h +0 -52
  462. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +0 -1747
  463. data/ext/ice/cpp/src/Ice/WSTransceiver.h +0 -141
  464. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +0 -915
  465. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +0 -1889
  466. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +0 -730
  467. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +0 -1197
  468. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +0 -105
  469. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +0 -52
  470. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +0 -75
  471. data/ext/ice/cpp/src/IceSSL/ConnectionInfoF.cpp +0 -61
  472. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +0 -75
  473. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +0 -1092
  474. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +0 -246
  475. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +0 -719
  476. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +0 -868
  477. data/ext/ice/cpp/src/IceSSL/UWPCertificateI.cpp +0 -266
  478. data/ext/ice/cpp/src/IceSSL/UWPEngine.cpp +0 -338
  479. data/ext/ice/cpp/src/IceSSL/UWPEngine.h +0 -41
  480. data/ext/ice/cpp/src/IceSSL/UWPEngineF.h +0 -26
  481. data/ext/ice/cpp/src/IceSSL/UWPPluginI.cpp +0 -89
  482. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.cpp +0 -383
  483. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.h +0 -71
  484. data/ext/ice/cpp/src/IceSSL/Util.cpp +0 -192
  485. data/ext/ice/cpp/src/IceUtil/ConsoleUtil.cpp +0 -157
  486. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +0 -484
  487. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +0 -242
  488. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +0 -690
  489. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +0 -1180
  490. data/ext/ice/cpp/src/IceUtil/UUID.cpp +0 -169
  491. data/ext/ice/cpp/src/IceUtil/UtilException.cpp +0 -839
  492. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +0 -5154
  493. data/ext/ice/cpp/src/Slice/JavaUtil.h +0 -398
  494. data/ext/ice/mcpp/CMakeLists.txt +0 -80
  495. data/ext/ice/mcpp/LICENSE +0 -29
  496. data/ext/ice/mcpp/Makefile +0 -63
  497. data/ext/ice/mcpp/README.md +0 -32
  498. data/ext/ice/mcpp/directive.c +0 -1404
  499. data/ext/ice/mcpp/internal.H +0 -530
  500. data/ext/ice/mcpp/main.c +0 -792
  501. data/ext/ice/mcpp/mcpp.gyp +0 -88
  502. data/ext/ice/mcpp/support.c +0 -1985
  503. data/ext/ice/mcpp/system.c +0 -2741
  504. data/lib/Glacier2/Metrics.rb +0 -56
  505. data/lib/Glacier2/PermissionsVerifier.rb +0 -93
  506. data/lib/Glacier2/PermissionsVerifierF.rb +0 -30
  507. data/lib/Glacier2/Router.rb +0 -95
  508. data/lib/Glacier2/RouterF.rb +0 -25
  509. data/lib/Glacier2/SSLInfo.rb +0 -72
  510. data/lib/Glacier2/Session.rb +0 -247
  511. data/lib/Ice/BuiltinSequences.rb +0 -60
  512. data/lib/Ice/Communicator.rb +0 -87
  513. data/lib/Ice/CommunicatorF.rb +0 -24
  514. data/lib/Ice/Connection.rb +0 -413
  515. data/lib/Ice/ConnectionF.rb +0 -32
  516. data/lib/Ice/Current.rb +0 -141
  517. data/lib/Ice/Endpoint.rb +0 -187
  518. data/lib/Ice/EndpointF.rb +0 -48
  519. data/lib/Ice/EndpointTypes.rb +0 -69
  520. data/lib/Ice/FacetMap.rb +0 -24
  521. data/lib/Ice/Identity.rb +0 -63
  522. data/lib/Ice/ImplicitContext.rb +0 -26
  523. data/lib/Ice/ImplicitContextF.rb +0 -24
  524. data/lib/Ice/Instrumentation.rb +0 -169
  525. data/lib/Ice/InstrumentationF.rb +0 -31
  526. data/lib/Ice/LocalException.rb +0 -1031
  527. data/lib/Ice/Locator.rb +0 -196
  528. data/lib/Ice/LocatorF.rb +0 -30
  529. data/lib/Ice/Logger.rb +0 -24
  530. data/lib/Ice/LoggerF.rb +0 -24
  531. data/lib/Ice/Metrics.rb +0 -337
  532. data/lib/Ice/ObjectAdapter.rb +0 -29
  533. data/lib/Ice/ObjectAdapterF.rb +0 -24
  534. data/lib/Ice/ObjectFactory.rb +0 -24
  535. data/lib/Ice/Plugin.rb +0 -30
  536. data/lib/Ice/PluginF.rb +0 -28
  537. data/lib/Ice/Process.rb +0 -53
  538. data/lib/Ice/ProcessF.rb +0 -25
  539. data/lib/Ice/Properties.rb +0 -25
  540. data/lib/Ice/PropertiesAdmin.rb +0 -63
  541. data/lib/Ice/PropertiesF.rb +0 -29
  542. data/lib/Ice/RemoteLogger.rb +0 -207
  543. data/lib/Ice/Router.rb +0 -87
  544. data/lib/Ice/RouterF.rb +0 -25
  545. data/lib/Ice/ServantLocator.rb +0 -26
  546. data/lib/Ice/ServantLocatorF.rb +0 -24
  547. data/lib/Ice/SliceChecksumDict.rb +0 -24
  548. data/lib/Ice/ValueFactory.rb +0 -28
  549. data/lib/Ice/Version.rb +0 -90
  550. data/lib/IceBox/IceBox.rb +0 -164
  551. data/lib/IceGrid/Admin.rb +0 -1196
  552. data/lib/IceGrid/Descriptor.rb +0 -1034
  553. data/lib/IceGrid/Exception.rb +0 -376
  554. data/lib/IceGrid/FileParser.rb +0 -65
  555. data/lib/IceGrid/PluginFacade.rb +0 -35
  556. data/lib/IceGrid/Registry.rb +0 -209
  557. data/lib/IceGrid/Session.rb +0 -71
  558. data/lib/IceGrid/UserAccountMapper.rb +0 -61
  559. data/lib/IcePatch2/FileInfo.rb +0 -115
  560. data/lib/IcePatch2/FileServer.rb +0 -123
  561. data/lib/IceStorm/IceStorm.rb +0 -332
  562. data/lib/IceStorm/Metrics.rb +0 -73
  563. data/slice/Ice/Connection.ice +0 -516
  564. data/slice/Ice/Current.ice +0 -170
  565. data/slice/Ice/Locator.ice +0 -239
  566. data/slice/Ice/Metrics.ice +0 -436
  567. data/slice/Ice/ObjectAdapter.ice +0 -710
  568. data/slice/Ice/Properties.ice +0 -244
  569. data/slice/Ice/Router.ice +0 -103
  570. data/slice/IceBT/ConnectionInfo.ice +0 -59
  571. data/slice/IceBT/EndpointInfo.ice +0 -57
  572. data/slice/IceBT/Types.ice +0 -45
  573. data/slice/IceDiscovery/IceDiscovery.ice +0 -98
  574. data/slice/IceGrid/PluginFacade.ice +0 -329
  575. data/slice/IceIAP/ConnectionInfo.ice +0 -74
  576. data/slice/IceIAP/EndpointInfo.ice +0 -68
  577. data/slice/IceLocatorDiscovery/IceLocatorDiscovery.ice +0 -83
  578. data/slice/IceSSL/ConnectionInfo.ice +0 -54
  579. data/slice/IceSSL/ConnectionInfoF.ice +0 -31
  580. data/slice/IceSSL/EndpointInfo.ice +0 -45
  581. data/slice/IceStorm/IceStorm.ice +0 -414
  582. /data/{ext → dist/IceRuby}/Communicator.cpp +0 -0
  583. /data/{ext → dist/IceRuby}/Communicator.h +0 -0
  584. /data/{ext → dist/IceRuby}/Config.h +0 -0
  585. /data/{ext → dist/IceRuby}/Connection.h +0 -0
  586. /data/{ext → dist/IceRuby}/Endpoint.h +0 -0
  587. /data/{ext → dist/IceRuby}/ImplicitContext.h +0 -0
  588. /data/{ext → dist/IceRuby}/Init.cpp +0 -0
  589. /data/{ext → dist/IceRuby}/Logger.h +0 -0
  590. /data/{ext → dist/IceRuby}/Operation.h +0 -0
  591. /data/{ext → dist/IceRuby}/Properties.h +0 -0
  592. /data/{ext → dist/IceRuby}/Proxy.cpp +0 -0
  593. /data/{ext → dist/IceRuby}/Proxy.h +0 -0
  594. /data/{ext → dist/IceRuby}/Slice.cpp +0 -0
  595. /data/{ext → dist/IceRuby}/Slice.h +0 -0
  596. /data/{ext → dist/IceRuby}/Util.cpp +0 -0
  597. /data/{ext → dist/IceRuby}/Util.h +0 -0
  598. /data/{ext → dist/IceRuby}/ValueFactoryManager.h +0 -0
  599. /data/{ext → dist}/ice/cpp/include/Ice/Application.h +0 -0
  600. /data/{ext → dist}/ice/cpp/include/Ice/AsyncResult.h +0 -0
  601. /data/{ext → dist}/ice/cpp/include/Ice/AsyncResultF.h +0 -0
  602. /data/{ext → dist}/ice/cpp/include/Ice/BatchRequestInterceptor.h +0 -0
  603. /data/{ext → dist}/ice/cpp/include/Ice/BatchRequestQueueF.h +0 -0
  604. /data/{ext → dist}/ice/cpp/include/Ice/Buffer.h +0 -0
  605. /data/{ext → dist}/ice/cpp/include/Ice/CommunicatorAsync.h +0 -0
  606. /data/{ext → dist}/ice/cpp/include/Ice/Comparable.h +0 -0
  607. /data/{ext → dist}/ice/cpp/include/Ice/ConnectionAsync.h +0 -0
  608. /data/{ext → dist}/ice/cpp/include/Ice/ConnectionIF.h +0 -0
  609. /data/{ext → dist}/ice/cpp/include/Ice/DefaultValueFactory.h +0 -0
  610. /data/{ext → dist}/ice/cpp/include/Ice/DispatchInterceptor.h +0 -0
  611. /data/{ext → dist}/ice/cpp/include/Ice/Dispatcher.h +0 -0
  612. /data/{ext → dist}/ice/cpp/include/Ice/DynamicLibrary.h +0 -0
  613. /data/{ext → dist}/ice/cpp/include/Ice/DynamicLibraryF.h +0 -0
  614. /data/{ext → dist}/ice/cpp/include/Ice/Exception.h +0 -0
  615. /data/{ext → dist}/ice/cpp/include/Ice/FactoryTable.h +0 -0
  616. /data/{ext → dist}/ice/cpp/include/Ice/FactoryTableInit.h +0 -0
  617. /data/{ext → dist}/ice/cpp/include/Ice/Format.h +0 -0
  618. /data/{ext → dist}/ice/cpp/include/Ice/Functional.h +0 -0
  619. /data/{ext → dist}/ice/cpp/include/Ice/GCObject.h +0 -0
  620. /data/{ext → dist}/ice/cpp/include/Ice/Handle.h +0 -0
  621. /data/{ext → dist}/ice/cpp/include/Ice/IconvStringConverter.h +0 -0
  622. /data/{ext → dist}/ice/cpp/include/Ice/Incoming.h +0 -0
  623. /data/{ext → dist}/ice/cpp/include/Ice/IncomingAsync.h +0 -0
  624. /data/{ext → dist}/ice/cpp/include/Ice/IncomingAsyncF.h +0 -0
  625. /data/{ext → dist}/ice/cpp/include/Ice/InputStream.h +0 -0
  626. /data/{ext → dist}/ice/cpp/include/Ice/InstanceF.h +0 -0
  627. /data/{ext → dist}/ice/cpp/include/Ice/InterfaceByValue.h +0 -0
  628. /data/{ext → dist}/ice/cpp/include/Ice/LocalObject.h +0 -0
  629. /data/{ext → dist}/ice/cpp/include/Ice/LocalObjectF.h +0 -0
  630. /data/{ext → dist}/ice/cpp/include/Ice/LoggerUtil.h +0 -0
  631. /data/{ext → dist}/ice/cpp/include/Ice/MetricsAdminI.h +0 -0
  632. /data/{ext → dist}/ice/cpp/include/Ice/MetricsFunctional.h +0 -0
  633. /data/{ext → dist}/ice/cpp/include/Ice/NativePropertiesAdmin.h +0 -0
  634. /data/{ext → dist}/ice/cpp/include/Ice/Object.h +0 -0
  635. /data/{ext → dist}/ice/cpp/include/Ice/ObjectF.h +0 -0
  636. /data/{ext → dist}/ice/cpp/include/Ice/ObserverHelper.h +0 -0
  637. /data/{ext → dist}/ice/cpp/include/Ice/Optional.h +0 -0
  638. /data/{ext → dist}/ice/cpp/include/Ice/OutgoingAsyncF.h +0 -0
  639. /data/{ext → dist}/ice/cpp/include/Ice/OutputStream.h +0 -0
  640. /data/{ext → dist}/ice/cpp/include/Ice/Protocol.h +0 -0
  641. /data/{ext → dist}/ice/cpp/include/Ice/ProxyF.h +0 -0
  642. /data/{ext → dist}/ice/cpp/include/Ice/ProxyFactoryF.h +0 -0
  643. /data/{ext → dist}/ice/cpp/include/Ice/ProxyHandle.h +0 -0
  644. /data/{ext → dist}/ice/cpp/include/Ice/ReferenceF.h +0 -0
  645. /data/{ext → dist}/ice/cpp/include/Ice/RegisterPlugins.h +0 -0
  646. /data/{ext → dist}/ice/cpp/include/Ice/RequestHandlerF.h +0 -0
  647. /data/{ext → dist}/ice/cpp/include/Ice/ResponseHandlerF.h +0 -0
  648. /data/{ext → dist}/ice/cpp/include/Ice/ServantManagerF.h +0 -0
  649. /data/{ext → dist}/ice/cpp/include/Ice/Service.h +0 -0
  650. /data/{ext → dist}/ice/cpp/include/Ice/SliceChecksums.h +0 -0
  651. /data/{ext → dist}/ice/cpp/include/Ice/SlicedData.h +0 -0
  652. /data/{ext → dist}/ice/cpp/include/Ice/SlicedDataF.h +0 -0
  653. /data/{ext → dist}/ice/cpp/include/Ice/StreamHelpers.h +0 -0
  654. /data/{ext → dist}/ice/cpp/include/Ice/StringConverter.h +0 -0
  655. /data/{ext → dist}/ice/cpp/include/Ice/ThreadPoolF.h +0 -0
  656. /data/{ext → dist}/ice/cpp/include/Ice/UUID.h +0 -0
  657. /data/{ext → dist}/ice/cpp/include/Ice/UniquePtr.h +0 -0
  658. /data/{ext → dist}/ice/cpp/include/Ice/UniqueRef.h +0 -0
  659. /data/{ext → dist}/ice/cpp/include/Ice/Value.h +0 -0
  660. /data/{ext → dist}/ice/cpp/include/Ice/ValueF.h +0 -0
  661. /data/{ext → dist}/ice/cpp/include/IceSSL/Config.h +0 -0
  662. /data/{ext → dist}/ice/cpp/include/IceSSL/OpenSSL.h +0 -0
  663. /data/{ext → dist}/ice/cpp/include/IceSSL/Plugin.h +0 -0
  664. /data/{ext → dist}/ice/cpp/include/IceSSL/SChannel.h +0 -0
  665. /data/{ext → dist}/ice/cpp/include/IceSSL/SecureTransport.h +0 -0
  666. /data/{ext → dist}/ice/cpp/include/IceUtil/Atomic.h +0 -0
  667. /data/{ext → dist}/ice/cpp/include/IceUtil/CountDownLatch.h +0 -0
  668. /data/{ext → dist}/ice/cpp/include/IceUtil/DisableWarnings.h +0 -0
  669. /data/{ext → dist}/ice/cpp/include/IceUtil/Exception.h +0 -0
  670. /data/{ext → dist}/ice/cpp/include/IceUtil/Functional.h +0 -0
  671. /data/{ext → dist}/ice/cpp/include/IceUtil/Handle.h +0 -0
  672. /data/{ext → dist}/ice/cpp/include/IceUtil/Iterator.h +0 -0
  673. /data/{ext → dist}/ice/cpp/include/IceUtil/Lock.h +0 -0
  674. /data/{ext → dist}/ice/cpp/include/IceUtil/Monitor.h +0 -0
  675. /data/{ext → dist}/ice/cpp/include/IceUtil/MutexProtocol.h +0 -0
  676. /data/{ext → dist}/ice/cpp/include/IceUtil/MutexPtrLock.h +0 -0
  677. /data/{ext → dist}/ice/cpp/include/IceUtil/MutexPtrTryLock.h +0 -0
  678. /data/{ext → dist}/ice/cpp/include/IceUtil/Optional.h +0 -0
  679. /data/{ext → dist}/ice/cpp/include/IceUtil/Options.h +0 -0
  680. /data/{ext → dist}/ice/cpp/include/IceUtil/OutputUtil.h +0 -0
  681. /data/{ext → dist}/ice/cpp/include/IceUtil/PopDisableWarnings.h +0 -0
  682. /data/{ext → dist}/ice/cpp/include/IceUtil/PushDisableWarnings.h +0 -0
  683. /data/{ext → dist}/ice/cpp/include/IceUtil/Random.h +0 -0
  684. /data/{ext → dist}/ice/cpp/include/IceUtil/RecMutex.h +0 -0
  685. /data/{ext → dist}/ice/cpp/include/IceUtil/ScannerConfig.h +0 -0
  686. /data/{ext → dist}/ice/cpp/include/IceUtil/ScopedArray.h +0 -0
  687. /data/{ext → dist}/ice/cpp/include/IceUtil/Shared.h +0 -0
  688. /data/{ext → dist}/ice/cpp/include/IceUtil/StopWatch.h +0 -0
  689. /data/{ext → dist}/ice/cpp/include/IceUtil/StringConverter.h +0 -0
  690. /data/{ext → dist}/ice/cpp/include/IceUtil/StringUtil.h +0 -0
  691. /data/{ext → dist}/ice/cpp/include/IceUtil/ThreadException.h +0 -0
  692. /data/{ext → dist}/ice/cpp/include/IceUtil/Time.h +0 -0
  693. /data/{ext → dist}/ice/cpp/include/IceUtil/UUID.h +0 -0
  694. /data/{ext → dist}/ice/cpp/include/IceUtil/UndefSysMacros.h +0 -0
  695. /data/{ext → dist}/ice/cpp/src/Ice/ACM.cpp +0 -0
  696. /data/{ext → dist}/ice/cpp/src/Ice/ACM.h +0 -0
  697. /data/{ext → dist}/ice/cpp/src/Ice/ACMF.h +0 -0
  698. /data/{ext → dist}/ice/cpp/src/Ice/Acceptor.cpp +0 -0
  699. /data/{ext → dist}/ice/cpp/src/Ice/AcceptorF.h +0 -0
  700. /data/{ext → dist}/ice/cpp/src/Ice/ArgVector.cpp +0 -0
  701. /data/{ext → dist}/ice/cpp/src/Ice/ArgVector.h +0 -0
  702. /data/{ext → dist}/ice/cpp/src/Ice/AsyncResult.cpp +0 -0
  703. /data/{ext → dist}/ice/cpp/src/Ice/Base64.cpp +0 -0
  704. /data/{ext → dist}/ice/cpp/src/Ice/Base64.h +0 -0
  705. /data/{ext → dist}/ice/cpp/src/Ice/BatchRequestQueue.cpp +0 -0
  706. /data/{ext → dist}/ice/cpp/src/Ice/BatchRequestQueue.h +0 -0
  707. /data/{ext → dist}/ice/cpp/src/Ice/Buffer.cpp +0 -0
  708. /data/{ext → dist}/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +0 -0
  709. /data/{ext → dist}/ice/cpp/src/Ice/CollocatedRequestHandler.h +0 -0
  710. /data/{ext → dist}/ice/cpp/src/Ice/CommunicatorI.cpp +0 -0
  711. /data/{ext → dist}/ice/cpp/src/Ice/CommunicatorI.h +0 -0
  712. /data/{ext → dist}/ice/cpp/src/Ice/Cond.cpp +0 -0
  713. /data/{ext → dist}/ice/cpp/src/Ice/ConnectRequestHandler.cpp +0 -0
  714. /data/{ext → dist}/ice/cpp/src/Ice/ConnectRequestHandler.h +0 -0
  715. /data/{ext → dist}/ice/cpp/src/Ice/ConnectRequestHandlerF.h +0 -0
  716. /data/{ext → dist}/ice/cpp/src/Ice/ConnectionFactoryF.h +0 -0
  717. /data/{ext → dist}/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +0 -0
  718. /data/{ext → dist}/ice/cpp/src/Ice/ConnectionRequestHandler.h +0 -0
  719. /data/{ext → dist}/ice/cpp/src/Ice/Connector.cpp +0 -0
  720. /data/{ext → dist}/ice/cpp/src/Ice/Connector.h +0 -0
  721. /data/{ext → dist}/ice/cpp/src/Ice/ConnectorF.h +0 -0
  722. /data/{ext → dist}/ice/cpp/src/Ice/DefaultsAndOverrides.h +0 -0
  723. /data/{ext → dist}/ice/cpp/src/Ice/DefaultsAndOverridesF.h +0 -0
  724. /data/{ext → dist}/ice/cpp/src/Ice/DispatchInterceptor.cpp +0 -0
  725. /data/{ext → dist}/ice/cpp/src/Ice/EndpointFactory.h +0 -0
  726. /data/{ext → dist}/ice/cpp/src/Ice/EndpointFactoryF.h +0 -0
  727. /data/{ext → dist}/ice/cpp/src/Ice/EndpointFactoryManager.cpp +0 -0
  728. /data/{ext → dist}/ice/cpp/src/Ice/EndpointFactoryManager.h +0 -0
  729. /data/{ext → dist}/ice/cpp/src/Ice/EndpointFactoryManagerF.h +0 -0
  730. /data/{ext → dist}/ice/cpp/src/Ice/EndpointI.h +0 -0
  731. /data/{ext → dist}/ice/cpp/src/Ice/EndpointIF.h +0 -0
  732. /data/{ext → dist}/ice/cpp/src/Ice/EventHandlerF.h +0 -0
  733. /data/{ext → dist}/ice/cpp/src/Ice/FactoryTable.cpp +0 -0
  734. /data/{ext → dist}/ice/cpp/src/Ice/FactoryTableInit.cpp +0 -0
  735. /data/{ext → dist}/ice/cpp/src/Ice/GCObject.cpp +0 -0
  736. /data/{ext → dist}/ice/cpp/src/Ice/HashUtil.h +0 -0
  737. /data/{ext → dist}/ice/cpp/src/Ice/HttpParser.cpp +0 -0
  738. /data/{ext → dist}/ice/cpp/src/Ice/HttpParser.h +0 -0
  739. /data/{ext → dist}/ice/cpp/src/Ice/IPEndpointIF.h +0 -0
  740. /data/{ext → dist}/ice/cpp/src/Ice/IconvStringConverter.cpp +0 -0
  741. /data/{ext → dist}/ice/cpp/src/Ice/ImplicitContextI.cpp +0 -0
  742. /data/{ext → dist}/ice/cpp/src/Ice/ImplicitContextI.h +0 -0
  743. /data/{ext → dist}/ice/cpp/src/Ice/Incoming.cpp +0 -0
  744. /data/{ext → dist}/ice/cpp/src/Ice/IncomingAsync.cpp +0 -0
  745. /data/{ext → dist}/ice/cpp/src/Ice/IncomingRequest.h +0 -0
  746. /data/{ext → dist}/ice/cpp/src/Ice/Initialize.cpp +0 -0
  747. /data/{ext → dist}/ice/cpp/src/Ice/Instance.h +0 -0
  748. /data/{ext → dist}/ice/cpp/src/Ice/InstrumentationI.cpp +0 -0
  749. /data/{ext → dist}/ice/cpp/src/Ice/InstrumentationI.h +0 -0
  750. /data/{ext → dist}/ice/cpp/src/Ice/LocalObject.cpp +0 -0
  751. /data/{ext → dist}/ice/cpp/src/Ice/LocatorInfo.cpp +0 -0
  752. /data/{ext → dist}/ice/cpp/src/Ice/LocatorInfo.h +0 -0
  753. /data/{ext → dist}/ice/cpp/src/Ice/LocatorInfoF.h +0 -0
  754. /data/{ext → dist}/ice/cpp/src/Ice/LoggerAdminI.cpp +0 -0
  755. /data/{ext → dist}/ice/cpp/src/Ice/LoggerAdminI.h +0 -0
  756. /data/{ext → dist}/ice/cpp/src/Ice/LoggerI.h +0 -0
  757. /data/{ext → dist}/ice/cpp/src/Ice/LoggerUtil.cpp +0 -0
  758. /data/{ext → dist}/ice/cpp/src/Ice/MetricsObserverI.cpp +0 -0
  759. /data/{ext → dist}/ice/cpp/src/Ice/NetworkProxy.h +0 -0
  760. /data/{ext → dist}/ice/cpp/src/Ice/NetworkProxyF.h +0 -0
  761. /data/{ext → dist}/ice/cpp/src/Ice/OSLogLoggerI.cpp +0 -0
  762. /data/{ext → dist}/ice/cpp/src/Ice/OSLogLoggerI.h +0 -0
  763. /data/{ext → dist}/ice/cpp/src/Ice/Object.cpp +0 -0
  764. /data/{ext → dist}/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +0 -0
  765. /data/{ext → dist}/ice/cpp/src/Ice/ObjectAdapterFactory.h +0 -0
  766. /data/{ext → dist}/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +0 -0
  767. /data/{ext → dist}/ice/cpp/src/Ice/ObjectAdapterI.h +0 -0
  768. /data/{ext → dist}/ice/cpp/src/Ice/ObserverHelper.cpp +0 -0
  769. /data/{ext → dist}/ice/cpp/src/Ice/OpaqueEndpointI.cpp +0 -0
  770. /data/{ext → dist}/ice/cpp/src/Ice/OpaqueEndpointI.h +0 -0
  771. /data/{ext → dist}/ice/cpp/src/Ice/OutputStream.cpp +0 -0
  772. /data/{ext → dist}/ice/cpp/src/Ice/PluginManagerI.h +0 -0
  773. /data/{ext → dist}/ice/cpp/src/Ice/PropertiesAdminI.cpp +0 -0
  774. /data/{ext → dist}/ice/cpp/src/Ice/PropertiesAdminI.h +0 -0
  775. /data/{ext → dist}/ice/cpp/src/Ice/PropertiesI.h +0 -0
  776. /data/{ext → dist}/ice/cpp/src/Ice/Protocol.cpp +0 -0
  777. /data/{ext → dist}/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -0
  778. /data/{ext → dist}/ice/cpp/src/Ice/ProtocolInstance.h +0 -0
  779. /data/{ext → dist}/ice/cpp/src/Ice/ProtocolInstanceF.h +0 -0
  780. /data/{ext → dist}/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +0 -0
  781. /data/{ext → dist}/ice/cpp/src/Ice/ProtocolPluginFacade.h +0 -0
  782. /data/{ext → dist}/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +0 -0
  783. /data/{ext → dist}/ice/cpp/src/Ice/ProxyFactory.cpp +0 -0
  784. /data/{ext → dist}/ice/cpp/src/Ice/ProxyFactory.h +0 -0
  785. /data/{ext → dist}/ice/cpp/src/Ice/Reference.cpp +0 -0
  786. /data/{ext → dist}/ice/cpp/src/Ice/Reference.h +0 -0
  787. /data/{ext → dist}/ice/cpp/src/Ice/ReferenceFactory.cpp +0 -0
  788. /data/{ext → dist}/ice/cpp/src/Ice/ReferenceFactory.h +0 -0
  789. /data/{ext → dist}/ice/cpp/src/Ice/ReferenceFactoryF.h +0 -0
  790. /data/{ext → dist}/ice/cpp/src/Ice/RegisterPluginsInit.cpp +0 -0
  791. /data/{ext → dist}/ice/cpp/src/Ice/RegisterPluginsInit.h +0 -0
  792. /data/{ext → dist}/ice/cpp/src/Ice/ReplyStatus.h +0 -0
  793. /data/{ext → dist}/ice/cpp/src/Ice/RequestHandler.cpp +0 -0
  794. /data/{ext → dist}/ice/cpp/src/Ice/RequestHandler.h +0 -0
  795. /data/{ext → dist}/ice/cpp/src/Ice/RequestHandlerFactory.cpp +0 -0
  796. /data/{ext → dist}/ice/cpp/src/Ice/RequestHandlerFactory.h +0 -0
  797. /data/{ext → dist}/ice/cpp/src/Ice/ResponseHandler.cpp +0 -0
  798. /data/{ext → dist}/ice/cpp/src/Ice/ResponseHandler.h +0 -0
  799. /data/{ext → dist}/ice/cpp/src/Ice/RetryQueue.cpp +0 -0
  800. /data/{ext → dist}/ice/cpp/src/Ice/RetryQueue.h +0 -0
  801. /data/{ext → dist}/ice/cpp/src/Ice/RetryQueueF.h +0 -0
  802. /data/{ext → dist}/ice/cpp/src/Ice/RouterInfo.cpp +0 -0
  803. /data/{ext → dist}/ice/cpp/src/Ice/RouterInfo.h +0 -0
  804. /data/{ext → dist}/ice/cpp/src/Ice/RouterInfoF.h +0 -0
  805. /data/{ext → dist}/ice/cpp/src/Ice/ServantManager.cpp +0 -0
  806. /data/{ext → dist}/ice/cpp/src/Ice/ServantManager.h +0 -0
  807. /data/{ext → dist}/ice/cpp/src/Ice/SharedContext.h +0 -0
  808. /data/{ext → dist}/ice/cpp/src/Ice/SliceChecksums.cpp +0 -0
  809. /data/{ext → dist}/ice/cpp/src/Ice/SlicedData.cpp +0 -0
  810. /data/{ext → dist}/ice/cpp/src/Ice/StringConverterPlugin.cpp +0 -0
  811. /data/{ext → dist}/ice/cpp/src/Ice/StringUtil.h +0 -0
  812. /data/{ext → dist}/ice/cpp/src/Ice/SysLoggerI.cpp +0 -0
  813. /data/{ext → dist}/ice/cpp/src/Ice/SysLoggerI.h +0 -0
  814. /data/{ext → dist}/ice/cpp/src/Ice/SystemdJournalI.cpp +0 -0
  815. /data/{ext → dist}/ice/cpp/src/Ice/SystemdJournalI.h +0 -0
  816. /data/{ext → dist}/ice/cpp/src/Ice/TcpConnector.cpp +0 -0
  817. /data/{ext → dist}/ice/cpp/src/Ice/TcpConnector.h +0 -0
  818. /data/{ext → dist}/ice/cpp/src/Ice/TcpEndpointI.cpp +0 -0
  819. /data/{ext → dist}/ice/cpp/src/Ice/TcpEndpointI.h +0 -0
  820. /data/{ext → dist}/ice/cpp/src/Ice/Timer.cpp +0 -0
  821. /data/{ext → dist}/ice/cpp/src/Ice/TraceLevels.cpp +0 -0
  822. /data/{ext → dist}/ice/cpp/src/Ice/TraceLevels.h +0 -0
  823. /data/{ext → dist}/ice/cpp/src/Ice/TraceLevelsF.h +0 -0
  824. /data/{ext → dist}/ice/cpp/src/Ice/TraceUtil.cpp +0 -0
  825. /data/{ext → dist}/ice/cpp/src/Ice/TraceUtil.h +0 -0
  826. /data/{ext → dist}/ice/cpp/src/Ice/Transceiver.cpp +0 -0
  827. /data/{ext → dist}/ice/cpp/src/Ice/TransceiverF.h +0 -0
  828. /data/{ext → dist}/ice/cpp/src/Ice/UdpConnector.h +0 -0
  829. /data/{ext → dist}/ice/cpp/src/Ice/UdpEndpointI.cpp +0 -0
  830. /data/{ext → dist}/ice/cpp/src/Ice/UdpEndpointI.h +0 -0
  831. /data/{ext → dist}/ice/cpp/src/Ice/Value.cpp +0 -0
  832. /data/{ext → dist}/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +0 -0
  833. /data/{ext → dist}/ice/cpp/src/Ice/ValueFactoryManagerI.h +0 -0
  834. /data/{ext → dist}/ice/cpp/src/Ice/VirtualShared.h +0 -0
  835. /data/{ext → dist}/ice/cpp/src/Ice/WSConnector.cpp +0 -0
  836. /data/{ext → dist}/ice/cpp/src/Ice/WSConnector.h +0 -0
  837. /data/{ext → dist}/ice/cpp/src/Ice/WSEndpoint.cpp +0 -0
  838. /data/{ext → dist}/ice/cpp/src/Ice/WSEndpoint.h +0 -0
  839. /data/{ext → dist}/ice/cpp/src/IceDiscovery/LocatorI.cpp +0 -0
  840. /data/{ext → dist}/ice/cpp/src/IceDiscovery/LocatorI.h +0 -0
  841. /data/{ext → dist}/ice/cpp/src/IceDiscovery/LookupI.cpp +0 -0
  842. /data/{ext → dist}/ice/cpp/src/IceDiscovery/LookupI.h +0 -0
  843. /data/{ext → dist}/ice/cpp/src/IceDiscovery/PluginI.cpp +0 -0
  844. /data/{ext → dist}/ice/cpp/src/IceDiscovery/PluginI.h +0 -0
  845. /data/{ext → dist}/ice/cpp/src/IceLocatorDiscovery/Plugin.h +0 -0
  846. /data/{ext → dist}/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +0 -0
  847. /data/{ext → dist}/ice/cpp/src/IceSSL/CertificateI.cpp +0 -0
  848. /data/{ext → dist}/ice/cpp/src/IceSSL/CertificateI.h +0 -0
  849. /data/{ext → dist}/ice/cpp/src/IceSSL/ConnectorI.cpp +0 -0
  850. /data/{ext → dist}/ice/cpp/src/IceSSL/ConnectorI.h +0 -0
  851. /data/{ext → dist}/ice/cpp/src/IceSSL/EndpointI.cpp +0 -0
  852. /data/{ext → dist}/ice/cpp/src/IceSSL/EndpointI.h +0 -0
  853. /data/{ext → dist}/ice/cpp/src/IceSSL/Instance.cpp +0 -0
  854. /data/{ext → dist}/ice/cpp/src/IceSSL/Instance.h +0 -0
  855. /data/{ext → dist}/ice/cpp/src/IceSSL/InstanceF.h +0 -0
  856. /data/{ext → dist}/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +0 -0
  857. /data/{ext → dist}/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +0 -0
  858. /data/{ext → dist}/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -0
  859. /data/{ext → dist}/ice/cpp/src/IceSSL/OpenSSLEngineF.h +0 -0
  860. /data/{ext → dist}/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +0 -0
  861. /data/{ext → dist}/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +0 -0
  862. /data/{ext → dist}/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +0 -0
  863. /data/{ext → dist}/ice/cpp/src/IceSSL/OpenSSLUtil.h +0 -0
  864. /data/{ext → dist}/ice/cpp/src/IceSSL/PluginI.h +0 -0
  865. /data/{ext → dist}/ice/cpp/src/IceSSL/RFC2253.cpp +0 -0
  866. /data/{ext → dist}/ice/cpp/src/IceSSL/RFC2253.h +0 -0
  867. /data/{ext → dist}/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +0 -0
  868. /data/{ext → dist}/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -0
  869. /data/{ext → dist}/ice/cpp/src/IceSSL/SChannelEngine.h +0 -0
  870. /data/{ext → dist}/ice/cpp/src/IceSSL/SChannelEngineF.h +0 -0
  871. /data/{ext → dist}/ice/cpp/src/IceSSL/SChannelPluginI.cpp +0 -0
  872. /data/{ext → dist}/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +0 -0
  873. /data/{ext → dist}/ice/cpp/src/IceSSL/SChannelTransceiverI.h +0 -0
  874. /data/{ext → dist}/ice/cpp/src/IceSSL/SSLEngine.cpp +0 -0
  875. /data/{ext → dist}/ice/cpp/src/IceSSL/SSLEngine.h +0 -0
  876. /data/{ext → dist}/ice/cpp/src/IceSSL/SSLEngineF.h +0 -0
  877. /data/{ext → dist}/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +0 -0
  878. /data/{ext → dist}/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +0 -0
  879. /data/{ext → dist}/ice/cpp/src/IceSSL/SecureTransportEngine.h +0 -0
  880. /data/{ext → dist}/ice/cpp/src/IceSSL/SecureTransportEngineF.h +0 -0
  881. /data/{ext → dist}/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +0 -0
  882. /data/{ext → dist}/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +0 -0
  883. /data/{ext → dist}/ice/cpp/src/IceSSL/SecureTransportUtil.h +0 -0
  884. /data/{ext → dist}/ice/cpp/src/IceSSL/TrustManager.cpp +0 -0
  885. /data/{ext → dist}/ice/cpp/src/IceSSL/TrustManager.h +0 -0
  886. /data/{ext → dist}/ice/cpp/src/IceSSL/TrustManagerF.h +0 -0
  887. /data/{ext → dist}/ice/cpp/src/IceSSL/Util.h +0 -0
  888. /data/{ext → dist}/ice/cpp/src/IceUtil/ConvertUTF.cpp +0 -0
  889. /data/{ext → dist}/ice/cpp/src/IceUtil/ConvertUTF.h +0 -0
  890. /data/{ext → dist}/ice/cpp/src/IceUtil/CtrlCHandler.cpp +0 -0
  891. /data/{ext → dist}/ice/cpp/src/IceUtil/InputUtil.cpp +0 -0
  892. /data/{ext → dist}/ice/cpp/src/IceUtil/MutexProtocol.cpp +0 -0
  893. /data/{ext → dist}/ice/cpp/src/IceUtil/Options.cpp +0 -0
  894. /data/{ext → dist}/ice/cpp/src/IceUtil/OutputUtil.cpp +0 -0
  895. /data/{ext → dist}/ice/cpp/src/IceUtil/Random.cpp +0 -0
  896. /data/{ext → dist}/ice/cpp/src/IceUtil/Shared.cpp +0 -0
  897. /data/{ext → dist}/ice/cpp/src/IceUtil/ThreadException.cpp +0 -0
  898. /data/{ext → dist}/ice/cpp/src/IceUtil/Time.cpp +0 -0
  899. /data/{ext → dist}/ice/cpp/src/IceUtil/Unicode.cpp +0 -0
  900. /data/{ext → dist}/ice/cpp/src/IceUtil/Unicode.h +0 -0
  901. /data/{ext → dist}/ice/cpp/src/Slice/CPlusPlusUtil.cpp +0 -0
  902. /data/{ext → dist}/ice/cpp/src/Slice/CPlusPlusUtil.h +0 -0
  903. /data/{ext → dist}/ice/cpp/src/Slice/Checksum.cpp +0 -0
  904. /data/{ext → dist}/ice/cpp/src/Slice/Checksum.h +0 -0
  905. /data/{ext → dist}/ice/cpp/src/Slice/FileTracker.cpp +0 -0
  906. /data/{ext → dist}/ice/cpp/src/Slice/FileTracker.h +0 -0
  907. /data/{ext → dist}/ice/cpp/src/Slice/Grammar.cpp +0 -0
  908. /data/{ext → dist}/ice/cpp/src/Slice/Grammar.h +0 -0
  909. /data/{ext → dist}/ice/cpp/src/Slice/GrammarUtil.h +0 -0
  910. /data/{ext → dist}/ice/cpp/src/Slice/MD5.cpp +0 -0
  911. /data/{ext → dist}/ice/cpp/src/Slice/MD5.h +0 -0
  912. /data/{ext → dist}/ice/cpp/src/Slice/MD5I.cpp +0 -0
  913. /data/{ext → dist}/ice/cpp/src/Slice/MD5I.h +0 -0
  914. /data/{ext → dist}/ice/cpp/src/Slice/PHPUtil.cpp +0 -0
  915. /data/{ext → dist}/ice/cpp/src/Slice/PHPUtil.h +0 -0
  916. /data/{ext → dist}/ice/cpp/src/Slice/Parser.cpp +0 -0
  917. /data/{ext → dist}/ice/cpp/src/Slice/Parser.h +0 -0
  918. /data/{ext → dist}/ice/cpp/src/Slice/Preprocessor.cpp +0 -0
  919. /data/{ext → dist}/ice/cpp/src/Slice/Preprocessor.h +0 -0
  920. /data/{ext → dist}/ice/cpp/src/Slice/Python.cpp +0 -0
  921. /data/{ext → dist}/ice/cpp/src/Slice/PythonUtil.cpp +0 -0
  922. /data/{ext → dist}/ice/cpp/src/Slice/PythonUtil.h +0 -0
  923. /data/{ext → dist}/ice/cpp/src/Slice/Ruby.cpp +0 -0
  924. /data/{ext → dist}/ice/cpp/src/Slice/RubyUtil.cpp +0 -0
  925. /data/{ext → dist}/ice/cpp/src/Slice/RubyUtil.h +0 -0
  926. /data/{ext → dist}/ice/cpp/src/Slice/Scanner.cpp +0 -0
  927. /data/{ext → dist}/ice/cpp/src/Slice/SliceUtil.cpp +0 -0
  928. /data/{ext → dist}/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -0
  929. /data/{ext → dist}/ice/cpp/src/Slice/Util.h +0 -0
  930. /data/{ext → dist}/ice/mcpp/config.h +0 -0
  931. /data/{ext → dist}/ice/mcpp/configed.H +0 -0
  932. /data/{ext → dist}/ice/mcpp/eval.c +0 -0
  933. /data/{ext → dist}/ice/mcpp/expand.c +0 -0
  934. /data/{ext → dist}/ice/mcpp/mbchar.c +0 -0
  935. /data/{ext → dist}/ice/mcpp/mcpp_lib.h +0 -0
  936. /data/{ext → dist}/ice/mcpp/mcpp_out.h +0 -0
  937. /data/{ext → dist}/ice/mcpp/system.H +0 -0
  938. /data/{slice → dist/ice/slice}/Glacier2/Metrics.ice +0 -0
  939. /data/{slice → dist/ice/slice}/Glacier2/PermissionsVerifier.ice +0 -0
  940. /data/{slice → dist/ice/slice}/Glacier2/PermissionsVerifierF.ice +0 -0
  941. /data/{slice → dist/ice/slice}/Glacier2/Router.ice +0 -0
  942. /data/{slice → dist/ice/slice}/Glacier2/RouterF.ice +0 -0
  943. /data/{slice → dist/ice/slice}/Glacier2/SSLInfo.ice +0 -0
  944. /data/{slice → dist/ice/slice}/Glacier2/Session.ice +0 -0
  945. /data/{slice → dist/ice/slice}/Ice/BuiltinSequences.ice +0 -0
  946. /data/{slice → dist/ice/slice}/Ice/Communicator.ice +0 -0
  947. /data/{slice → dist/ice/slice}/Ice/CommunicatorF.ice +0 -0
  948. /data/{slice → dist/ice/slice}/Ice/ConnectionF.ice +0 -0
  949. /data/{slice → dist/ice/slice}/Ice/Endpoint.ice +0 -0
  950. /data/{slice → dist/ice/slice}/Ice/EndpointF.ice +0 -0
  951. /data/{slice → dist/ice/slice}/Ice/EndpointTypes.ice +0 -0
  952. /data/{slice → dist/ice/slice}/Ice/FacetMap.ice +0 -0
  953. /data/{slice → dist/ice/slice}/Ice/Identity.ice +0 -0
  954. /data/{slice → dist/ice/slice}/Ice/ImplicitContext.ice +0 -0
  955. /data/{slice → dist/ice/slice}/Ice/ImplicitContextF.ice +0 -0
  956. /data/{slice → dist/ice/slice}/Ice/Instrumentation.ice +0 -0
  957. /data/{slice → dist/ice/slice}/Ice/InstrumentationF.ice +0 -0
  958. /data/{slice → dist/ice/slice}/Ice/LocalException.ice +0 -0
  959. /data/{slice → dist/ice/slice}/Ice/LocatorF.ice +0 -0
  960. /data/{slice → dist/ice/slice}/Ice/Logger.ice +0 -0
  961. /data/{slice → dist/ice/slice}/Ice/LoggerF.ice +0 -0
  962. /data/{slice → dist/ice/slice}/Ice/ObjectAdapterF.ice +0 -0
  963. /data/{slice → dist/ice/slice}/Ice/ObjectFactory.ice +0 -0
  964. /data/{slice → dist/ice/slice}/Ice/Plugin.ice +0 -0
  965. /data/{slice → dist/ice/slice}/Ice/PluginF.ice +0 -0
  966. /data/{slice → dist/ice/slice}/Ice/Process.ice +0 -0
  967. /data/{slice → dist/ice/slice}/Ice/ProcessF.ice +0 -0
  968. /data/{slice → dist/ice/slice}/Ice/PropertiesAdmin.ice +0 -0
  969. /data/{slice → dist/ice/slice}/Ice/PropertiesF.ice +0 -0
  970. /data/{slice → dist/ice/slice}/Ice/RemoteLogger.ice +0 -0
  971. /data/{slice → dist/ice/slice}/Ice/RouterF.ice +0 -0
  972. /data/{slice → dist/ice/slice}/Ice/ServantLocator.ice +0 -0
  973. /data/{slice → dist/ice/slice}/Ice/ServantLocatorF.ice +0 -0
  974. /data/{slice → dist/ice/slice}/Ice/SliceChecksumDict.ice +0 -0
  975. /data/{slice → dist/ice/slice}/Ice/ValueFactory.ice +0 -0
  976. /data/{slice → dist/ice/slice}/Ice/Version.ice +0 -0
  977. /data/{slice → dist/ice/slice}/IceBox/IceBox.ice +0 -0
  978. /data/{slice → dist/ice/slice}/IceGrid/Admin.ice +0 -0
  979. /data/{slice → dist/ice/slice}/IceGrid/Descriptor.ice +0 -0
  980. /data/{slice → dist/ice/slice}/IceGrid/Exception.ice +0 -0
  981. /data/{slice → dist/ice/slice}/IceGrid/FileParser.ice +0 -0
  982. /data/{slice → dist/ice/slice}/IceGrid/Registry.ice +0 -0
  983. /data/{slice → dist/ice/slice}/IceGrid/Session.ice +0 -0
  984. /data/{slice → dist/ice/slice}/IceGrid/UserAccountMapper.ice +0 -0
  985. /data/{slice → dist/ice/slice}/IcePatch2/FileInfo.ice +0 -0
  986. /data/{slice → dist/ice/slice}/IcePatch2/FileServer.ice +0 -0
  987. /data/{slice → dist/ice/slice}/IceStorm/Metrics.ice +0 -0
  988. /data/{lib → dist/lib}/Glacier2.rb +0 -0
  989. /data/{lib → dist/lib}/Ice.rb +0 -0
  990. /data/{lib → dist/lib}/IceBox.rb +0 -0
  991. /data/{lib → dist/lib}/IceGrid.rb +0 -0
  992. /data/{lib → dist/lib}/IcePatch2.rb +0 -0
  993. /data/{lib → dist/lib}/IceStorm.rb +0 -0
  994. /data/{bin → scripts}/slice2rb +0 -0
@@ -1,3075 +0,0 @@
1
- //
2
- // Copyright (c) ZeroC, Inc. All rights reserved.
3
- //
4
-
5
- //
6
- // The following is required on HP-UX in order to bring in
7
- // the definition for the ip_mreq structure.
8
- //
9
- #if defined(__hpux)
10
- # undef _XOPEN_SOURCE_EXTENDED
11
- # define _XOPEN_SOURCE
12
- # include <netinet/in.h>
13
- #endif
14
-
15
- #include <IceUtil/DisableWarnings.h>
16
- #include <Ice/Network.h>
17
- #include <Ice/NetworkProxy.h>
18
- #include <IceUtil/StringUtil.h>
19
- #include <Ice/StringConverter.h>
20
- #include <Ice/LocalException.h>
21
- #include <Ice/ProtocolInstance.h> // For setTcpBufSize
22
- #include <Ice/Properties.h> // For setTcpBufSize
23
- #include <Ice/LoggerUtil.h> // For setTcpBufSize
24
- #include <Ice/Buffer.h>
25
- #include <IceUtil/Random.h>
26
- #include <functional>
27
-
28
- // TODO: fix this warning
29
- #if defined(_MSC_VER)
30
- # pragma warning(disable:4244) // 'argument': conversion from 'int' to 'u_short', possible loss of data
31
- #endif
32
-
33
- #if defined(ICE_OS_UWP)
34
- # include <IceUtil/InputUtil.h>
35
- #elif defined(_WIN32)
36
- # include <winsock2.h>
37
- # include <ws2tcpip.h>
38
- # ifdef __MINGW32__
39
- # include <wincrypt.h>
40
- # endif
41
- # include <iphlpapi.h>
42
- # include <Mswsock.h>
43
- # include <mstcpip.h>
44
- #else
45
- # include <net/if.h>
46
- # include <sys/ioctl.h>
47
- #endif
48
-
49
- #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
50
- # include <ifaddrs.h>
51
- #elif defined(__sun)
52
- # include <sys/sockio.h>
53
- #endif
54
-
55
- #if defined(__GNUC__) && (__GNUC__ < 5)
56
- # pragma GCC diagnostic ignored "-Wmissing-field-initializers"
57
- #endif
58
-
59
- #if defined(_WIN32)
60
- # ifndef SIO_LOOPBACK_FAST_PATH
61
- # define SIO_LOOPBACK_FAST_PATH _WSAIOW(IOC_VENDOR,16)
62
- # endif
63
- #endif
64
-
65
- #if defined(__MINGW32__)
66
- //
67
- // Work-around for missing definitions in MinGW Windows headers
68
- //
69
- # ifndef IPV6_V6ONLY
70
- # define IPV6_V6ONLY 27
71
- # endif
72
-
73
- extern "C"
74
- {
75
- WINSOCK_API_LINKAGE int WSAAPI inet_pton(INT, PCTSTR, PVOID);
76
- }
77
- #endif
78
-
79
- using namespace std;
80
- using namespace Ice;
81
- using namespace IceInternal;
82
-
83
- #ifdef ICE_OS_UWP
84
- using namespace Concurrency;
85
- using namespace Platform;
86
- using namespace Windows::Foundation;
87
- using namespace Windows::Foundation::Collections;
88
- using namespace Windows::Storage::Streams;
89
- using namespace Windows::Networking;
90
- using namespace Windows::Networking::Sockets;
91
- using namespace Windows::Networking::Connectivity;
92
- #endif
93
-
94
- #ifdef _WIN32
95
- int
96
- IceInternal::getSystemErrno()
97
- {
98
- return GetLastError();
99
- }
100
- #else
101
- int
102
- IceInternal::getSystemErrno()
103
- {
104
- return errno;
105
- }
106
- #endif
107
-
108
- namespace
109
- {
110
-
111
- struct AddressCompare
112
- {
113
- public:
114
-
115
- bool
116
- operator()(const Address& lhs, const Address& rhs) const
117
- {
118
- return compareAddress(lhs, rhs) < 0;
119
- }
120
- };
121
-
122
- #ifndef ICE_OS_UWP
123
-
124
- # ifndef ICE_CPP11_COMPILER
125
-
126
- struct AddressIsIPv6 : public unary_function<Address, bool>
127
- {
128
- public:
129
-
130
- bool
131
- operator()(const Address& ss) const
132
- {
133
- return ss.saStorage.ss_family == AF_INET6;
134
- }
135
- };
136
- # endif
137
-
138
- void
139
- sortAddresses(vector<Address>& addrs, ProtocolSupport protocol, Ice::EndpointSelectionType selType, bool preferIPv6)
140
- {
141
- if(selType == Ice::ICE_ENUM(EndpointSelectionType, Random))
142
- {
143
- IceUtilInternal::shuffle(addrs.begin(), addrs.end());
144
- }
145
-
146
- if(protocol == EnableBoth)
147
- {
148
- #ifdef ICE_CPP11_COMPILER
149
- if(preferIPv6)
150
- {
151
- stable_partition(addrs.begin(), addrs.end(),
152
- [](const Address& ss)
153
- {
154
- return ss.saStorage.ss_family == AF_INET6;
155
- });
156
- }
157
- else
158
- {
159
- stable_partition(addrs.begin(), addrs.end(),
160
- [](const Address& ss)
161
- {
162
- return ss.saStorage.ss_family != AF_INET6;
163
- });
164
- }
165
- #else
166
- if(preferIPv6)
167
- {
168
- stable_partition(addrs.begin(), addrs.end(), AddressIsIPv6());
169
- }
170
- else
171
- {
172
- stable_partition(addrs.begin(), addrs.end(), not1(AddressIsIPv6()));
173
- }
174
- #endif
175
- }
176
- }
177
-
178
- void
179
- setTcpNoDelay(SOCKET fd)
180
- {
181
- int flag = 1;
182
- if(setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<char*>(&flag), int(sizeof(int))) == SOCKET_ERROR)
183
- {
184
- closeSocketNoThrow(fd);
185
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
186
- }
187
- }
188
-
189
- void
190
- setKeepAlive(SOCKET fd)
191
- {
192
- int flag = 1;
193
- if(setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, reinterpret_cast<char*>(&flag), int(sizeof(int))) == SOCKET_ERROR)
194
- {
195
- closeSocketNoThrow(fd);
196
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
197
- }
198
- }
199
- #endif
200
-
201
- #if defined(_WIN32) && !defined(ICE_OS_UWP)
202
- void
203
- setTcpLoopbackFastPath(SOCKET fd)
204
- {
205
- int OptionValue = 1;
206
- DWORD NumberOfBytesReturned = 0;
207
-
208
- int status =
209
- WSAIoctl(fd, SIO_LOOPBACK_FAST_PATH, &OptionValue, sizeof(OptionValue), ICE_NULLPTR, 0, &NumberOfBytesReturned, 0, 0);
210
- if(status == SOCKET_ERROR)
211
- {
212
- // On platforms that do not support fast path (< Windows 8), WSAEONOTSUPP is expected.
213
- DWORD LastError = ::GetLastError();
214
- if(LastError != WSAEOPNOTSUPP)
215
- {
216
- closeSocketNoThrow(fd);
217
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
218
- }
219
- }
220
- }
221
- #endif
222
-
223
- #ifdef ICE_OS_UWP
224
- SOCKET
225
- createSocketImpl(bool udp, int)
226
- {
227
- if(udp)
228
- {
229
- return ref new DatagramSocket();
230
- }
231
- else
232
- {
233
- StreamSocket^ socket = ref new StreamSocket();
234
- socket->Control->KeepAlive = true;
235
- socket->Control->NoDelay = true;
236
- return socket;
237
- }
238
- }
239
- #else
240
- SOCKET
241
- createSocketImpl(bool udp, int family)
242
- {
243
- SOCKET fd;
244
- if(udp)
245
- {
246
- fd = socket(family, SOCK_DGRAM, IPPROTO_UDP);
247
- }
248
- else
249
- {
250
- fd = socket(family, SOCK_STREAM, IPPROTO_TCP);
251
- }
252
-
253
- if(fd == INVALID_SOCKET)
254
- {
255
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
256
- }
257
-
258
- if(!udp)
259
- {
260
- setTcpNoDelay(fd);
261
- setKeepAlive(fd);
262
-
263
- #if defined(_WIN32) && !defined(ICE_OS_UWP)
264
- //
265
- // FIX: the fast path loopback appears to cause issues with
266
- // connection closure when it's enabled. Sometime, a peer
267
- // doesn't receive the TCP/IP connection closure (RST) from
268
- // the other peer and it ends up hanging. This is showing up
269
- // with the background test when ran with WS. The test
270
- // sporadically hangs on exit. See bug #6093.
271
- //
272
- //setTcpLoopbackFastPath(fd);
273
- #endif
274
- }
275
-
276
- return fd;
277
- }
278
- #endif
279
-
280
- #ifndef ICE_OS_UWP
281
- vector<Address>
282
- getLocalAddresses(ProtocolSupport protocol, bool includeLoopback, bool singleAddressPerInterface)
283
- {
284
- vector<Address> result;
285
-
286
- #if defined(_WIN32)
287
- DWORD family;
288
- switch(protocol)
289
- {
290
- case EnableIPv4:
291
- family = AF_INET;
292
- break;
293
- case EnableIPv6:
294
- family = AF_INET6;
295
- break;
296
- default:
297
- family = AF_UNSPEC;
298
- break;
299
- }
300
-
301
- DWORD size = 0;
302
- DWORD rv = GetAdaptersAddresses(family, 0, ICE_NULLPTR, ICE_NULLPTR, &size);
303
- if(rv == ERROR_BUFFER_OVERFLOW)
304
- {
305
- PIP_ADAPTER_ADDRESSES adapter_addresses = (PIP_ADAPTER_ADDRESSES) malloc(size);
306
- rv = GetAdaptersAddresses(family, 0, ICE_NULLPTR, adapter_addresses, &size);
307
- if(rv == ERROR_SUCCESS)
308
- {
309
- for(PIP_ADAPTER_ADDRESSES aa = adapter_addresses; aa != ICE_NULLPTR; aa = aa->Next)
310
- {
311
- if(aa->OperStatus != IfOperStatusUp)
312
- {
313
- continue;
314
- }
315
- for(PIP_ADAPTER_UNICAST_ADDRESS ua = aa->FirstUnicastAddress; ua != ICE_NULLPTR; ua = ua->Next)
316
- {
317
- Address addr;
318
- memcpy(&addr.saStorage, ua->Address.lpSockaddr, ua->Address.iSockaddrLength);
319
- if(addr.saStorage.ss_family == AF_INET && protocol != EnableIPv6)
320
- {
321
- if(addr.saIn.sin_addr.s_addr != 0 &&
322
- (includeLoopback || addr.saIn.sin_addr.s_addr != htonl(INADDR_LOOPBACK)))
323
- {
324
- result.push_back(addr);
325
- if(singleAddressPerInterface)
326
- {
327
- break; // One address is enough for each interface.
328
- }
329
- }
330
- }
331
- else if(addr.saStorage.ss_family == AF_INET6 && protocol != EnableIPv4)
332
- {
333
- if(!IN6_IS_ADDR_UNSPECIFIED(&addr.saIn6.sin6_addr) &&
334
- (includeLoopback || !IN6_IS_ADDR_LOOPBACK(&addr.saIn6.sin6_addr)))
335
- {
336
- result.push_back(addr);
337
- if(singleAddressPerInterface)
338
- {
339
- break; // One address is enough for each interface.
340
- }
341
- }
342
- }
343
- }
344
- }
345
- }
346
-
347
- free(adapter_addresses);
348
- }
349
- #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
350
- struct ifaddrs* ifap;
351
- if(::getifaddrs(&ifap) == SOCKET_ERROR)
352
- {
353
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
354
- }
355
-
356
- struct ifaddrs* curr = ifap;
357
- set<string> interfaces;
358
- while(curr != 0)
359
- {
360
- if(curr->ifa_addr && (includeLoopback || !(curr->ifa_flags & IFF_LOOPBACK)))
361
- {
362
- if(curr->ifa_addr->sa_family == AF_INET && protocol != EnableIPv6)
363
- {
364
- Address addr;
365
- memcpy(&addr.saStorage, curr->ifa_addr, sizeof(sockaddr_in));
366
- if(addr.saIn.sin_addr.s_addr != 0)
367
- {
368
- if(!singleAddressPerInterface || interfaces.find(curr->ifa_name) == interfaces.end())
369
- {
370
- result.push_back(addr);
371
- interfaces.insert(curr->ifa_name);
372
- }
373
- }
374
- }
375
- else if(curr->ifa_addr->sa_family == AF_INET6 && protocol != EnableIPv4)
376
- {
377
- Address addr;
378
- memcpy(&addr.saStorage, curr->ifa_addr, sizeof(sockaddr_in6));
379
- if(!IN6_IS_ADDR_UNSPECIFIED(&addr.saIn6.sin6_addr))
380
- {
381
- if(!singleAddressPerInterface || interfaces.find(curr->ifa_name) == interfaces.end())
382
- {
383
- result.push_back(addr);
384
- interfaces.insert(curr->ifa_name);
385
- }
386
- }
387
- }
388
- }
389
-
390
- curr = curr->ifa_next;
391
- }
392
-
393
- ::freeifaddrs(ifap);
394
- #else
395
- for(int i = 0; i < 2; i++)
396
- {
397
- if((i == 0 && protocol == EnableIPv6) || (i == 1 && protocol == EnableIPv4))
398
- {
399
- continue;
400
- }
401
- SOCKET fd = createSocketImpl(false, i == 0 ? AF_INET : AF_INET6);
402
-
403
- #ifdef _AIX
404
- int cmd = CSIOCGIFCONF;
405
- #else
406
- int cmd = SIOCGIFCONF;
407
- #endif
408
- struct ifconf ifc;
409
- int numaddrs = 10;
410
- int old_ifc_len = 0;
411
-
412
- //
413
- // Need to call ioctl multiple times since we do not know up front
414
- // how many addresses there will be, and thus how large a buffer we need.
415
- // We keep increasing the buffer size until subsequent calls return
416
- // the same length, meaning we have all the addresses.
417
- //
418
- while(true)
419
- {
420
- int bufsize = numaddrs * static_cast<int>(sizeof(struct ifreq));
421
- ifc.ifc_len = bufsize;
422
- ifc.ifc_buf = (char*)malloc(bufsize);
423
-
424
- int rs = ioctl(fd, cmd, &ifc);
425
- if(rs == SOCKET_ERROR)
426
- {
427
- free(ifc.ifc_buf);
428
- closeSocketNoThrow(fd);
429
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
430
- }
431
- else if(ifc.ifc_len == old_ifc_len)
432
- {
433
- //
434
- // Returned same length twice in a row, finished.
435
- //
436
- break;
437
- }
438
- else
439
- {
440
- old_ifc_len = ifc.ifc_len;
441
- }
442
-
443
- numaddrs += 10;
444
- free(ifc.ifc_buf);
445
- }
446
- closeSocket(fd);
447
-
448
- numaddrs = ifc.ifc_len / static_cast<int>(sizeof(struct ifreq));
449
- struct ifreq* ifr = ifc.ifc_req;
450
- set<string> interfaces;
451
- for(int j = 0; j < numaddrs; ++j)
452
- {
453
- if(!(ifr[j].ifr_flags & IFF_LOOPBACK)) // Don't include loopback interface addresses
454
- {
455
- //
456
- // On Solaris the above Loopback check does not always work so we double
457
- // check the address below. Solaris also returns duplicate entries that need
458
- // to be filtered out.
459
- //
460
- if(ifr[j].ifr_addr.sa_family == AF_INET && protocol != EnableIPv6)
461
- {
462
- Address addr;
463
- memcpy(&addr.saStorage, &ifr[j].ifr_addr, sizeof(sockaddr_in));
464
- if(addr.saIn.sin_addr.s_addr != 0 &&
465
- (includeLoopback || addr.saIn.sin_addr.s_addr != htonl(INADDR_LOOPBACK)))
466
- {
467
- if(!singleAddressPerInterface || interfaces.find(ifr[j].ifr_name) == interfaces.end())
468
- {
469
- result.push_back(addr);
470
- interfaces.insert(ifr[j].ifr_name);
471
- }
472
- }
473
- }
474
- else if(ifr[j].ifr_addr.sa_family == AF_INET6 && protocol != EnableIPv4)
475
- {
476
- Address addr;
477
- memcpy(&addr.saStorage, &ifr[j].ifr_addr, sizeof(sockaddr_in6));
478
- if(!IN6_IS_ADDR_UNSPECIFIED(&addr.saIn6.sin6_addr) &&
479
- (includeLoopback || !IN6_IS_ADDR_LOOPBACK(&addr.saIn6.sin6_addr)))
480
- {
481
- if(!singleAddressPerInterface || interfaces.find(ifr[j].ifr_name) == interfaces.end())
482
- {
483
- result.push_back(addr);
484
- interfaces.insert(ifr[j].ifr_name);
485
- }
486
- }
487
- }
488
- }
489
- }
490
- free(ifc.ifc_buf);
491
- }
492
- #endif
493
-
494
- //
495
- // Remove potential duplicates from the result.
496
- //
497
- set<Address, AddressCompare> seen;
498
- vector<Address> tmp;
499
- tmp.swap(result);
500
- for(vector<Address>::const_iterator p = tmp.begin(); p != tmp.end(); ++p)
501
- {
502
- if(seen.find(*p) == seen.end())
503
- {
504
- result.push_back(*p);
505
- seen.insert(*p);
506
- }
507
- }
508
- return result;
509
- }
510
-
511
- bool
512
- isLinklocal(const Address& addr)
513
- {
514
- if(addr.saStorage.ss_family == AF_INET6)
515
- {
516
- return IN6_IS_ADDR_LINKLOCAL(&addr.saIn6.sin6_addr);
517
- }
518
- else if(addr.saStorage.ss_family == AF_INET)
519
- {
520
- // Check for 169.254.X.X in network order
521
- return (addr.saIn.sin_addr.s_addr & 0xFF) == 169 && ((addr.saIn.sin_addr.s_addr & 0xFF00)>>8) == 254;
522
- }
523
- return false;
524
- }
525
-
526
- bool
527
- isWildcard(const string& host, ProtocolSupport protocol, bool& ipv4)
528
- {
529
- Address addr = getAddressForServer(host, 0, protocol, true, false);
530
- if(addr.saStorage.ss_family == AF_INET)
531
- {
532
- if(addr.saIn.sin_addr.s_addr == INADDR_ANY)
533
- {
534
- ipv4 = true;
535
- return true;
536
- }
537
- }
538
- else if(addr.saStorage.ss_family == AF_INET6)
539
- {
540
- if(IN6_IS_ADDR_UNSPECIFIED(&addr.saIn6.sin6_addr))
541
- {
542
- ipv4 = false;
543
- return true;
544
- }
545
- }
546
- return false;
547
- }
548
-
549
- int
550
- getInterfaceIndex(const string& intf)
551
- {
552
- if(intf.empty())
553
- {
554
- return 0;
555
- }
556
-
557
- string name;
558
- bool isAddr;
559
- in6_addr addr;
560
- string::size_type pos = intf.find("%");
561
- if(pos != string::npos)
562
- {
563
- //
564
- // If it's a link-local address, use the zone indice.
565
- //
566
- isAddr = false;
567
- name = intf.substr(pos + 1);
568
- }
569
- else
570
- {
571
- //
572
- // Then check if it's an IPv6 address. If it's an address we'll
573
- // look for the interface index by address.
574
- //
575
- isAddr = inet_pton(AF_INET6, intf.c_str(), &addr) > 0;
576
- name = intf;
577
- }
578
-
579
- //
580
- // Check if index
581
- //
582
- int index = -1;
583
- istringstream p(name);
584
- if((p >> index) && p.eof())
585
- {
586
- return index;
587
- }
588
-
589
- #ifdef _WIN32
590
- IP_ADAPTER_ADDRESSES addrs;
591
- ULONG buflen = 0;
592
- if(::GetAdaptersAddresses(AF_INET6, 0, 0, &addrs, &buflen) == ERROR_BUFFER_OVERFLOW)
593
- {
594
- PIP_ADAPTER_ADDRESSES paddrs;
595
- char* buf = new char[buflen];
596
- paddrs = reinterpret_cast<PIP_ADAPTER_ADDRESSES>(buf);
597
- if(::GetAdaptersAddresses(AF_INET6, 0, 0, paddrs, &buflen) == NO_ERROR)
598
- {
599
- while(paddrs)
600
- {
601
- if(isAddr)
602
- {
603
- PIP_ADAPTER_UNICAST_ADDRESS ipAddr = paddrs->FirstUnicastAddress;
604
- while(ipAddr)
605
- {
606
- if(ipAddr->Address.lpSockaddr->sa_family == AF_INET6)
607
- {
608
- struct sockaddr_in6* ipv6Addr =
609
- reinterpret_cast<struct sockaddr_in6*>(ipAddr->Address.lpSockaddr);
610
- if(memcmp(&addr, &ipv6Addr->sin6_addr, sizeof(in6_addr)) == 0)
611
- {
612
- break;
613
- }
614
- }
615
- ipAddr = ipAddr->Next;
616
- }
617
- if(ipAddr)
618
- {
619
- index = paddrs->Ipv6IfIndex;
620
- break;
621
- }
622
- }
623
- else
624
- {
625
- //
626
- // Don't need to pass a wide string converter as the wide string
627
- // come from Windows API.
628
- //
629
- if(wstringToString(paddrs->FriendlyName, getProcessStringConverter()) == name)
630
- {
631
- index = paddrs->Ipv6IfIndex;
632
- break;
633
- }
634
- }
635
- paddrs = paddrs->Next;
636
- }
637
- }
638
- delete[] buf;
639
- }
640
- if(index < 0) // interface not found
641
- {
642
- throw Ice::SocketException(__FILE__, __LINE__, WSAEINVAL);
643
- }
644
- #elif !defined(__hpux)
645
-
646
- //
647
- // Look for an interface with a matching IP address
648
- //
649
- if(isAddr)
650
- {
651
- # if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
652
- struct ifaddrs* ifap;
653
- if(::getifaddrs(&ifap) != SOCKET_ERROR)
654
- {
655
- struct ifaddrs* curr = ifap;
656
- while(curr != 0)
657
- {
658
- if(curr->ifa_addr && curr->ifa_addr->sa_family == AF_INET6)
659
- {
660
- struct sockaddr_in6* ipv6Addr = reinterpret_cast<struct sockaddr_in6*>(curr->ifa_addr);
661
- if(memcmp(&addr, &ipv6Addr->sin6_addr, sizeof(in6_addr)) == 0)
662
- {
663
- index = static_cast<int>(if_nametoindex(curr->ifa_name));
664
- break;
665
- }
666
- }
667
- curr = curr->ifa_next;
668
- }
669
- ::freeifaddrs(ifap);
670
- }
671
- # else
672
- SOCKET fd = createSocketImpl(false, AF_INET6);
673
- # ifdef _AIX
674
- int cmd = CSIOCGIFCONF;
675
- # else
676
- int cmd = SIOCGIFCONF;
677
- # endif
678
- struct ifconf ifc;
679
- int numaddrs = 10;
680
- int old_ifc_len = 0;
681
-
682
- //
683
- // Need to call ioctl multiple times since we do not know up front
684
- // how many addresses there will be, and thus how large a buffer we need.
685
- // We keep increasing the buffer size until subsequent calls return
686
- // the same length, meaning we have all the addresses.
687
- //
688
- while(true)
689
- {
690
- int bufsize = numaddrs * static_cast<int>(sizeof(struct ifreq));
691
- ifc.ifc_len = bufsize;
692
- ifc.ifc_buf = (char*)malloc(bufsize);
693
-
694
- int rs = ioctl(fd, cmd, &ifc);
695
- if(rs == SOCKET_ERROR)
696
- {
697
- free(ifc.ifc_buf);
698
- ifc.ifc_buf = 0;
699
- break;
700
- }
701
- else if(ifc.ifc_len == old_ifc_len)
702
- {
703
- //
704
- // Returned same length twice in a row, finished.
705
- //
706
- break;
707
- }
708
- else
709
- {
710
- old_ifc_len = ifc.ifc_len;
711
- }
712
- numaddrs += 10;
713
- free(ifc.ifc_buf);
714
- }
715
- closeSocketNoThrow(fd);
716
-
717
- if(ifc.ifc_buf)
718
- {
719
- numaddrs = ifc.ifc_len / static_cast<int>(sizeof(struct ifreq));
720
- struct ifreq* ifr = ifc.ifc_req;
721
- for(int i = 0; i < numaddrs; ++i)
722
- {
723
- if(ifr[i].ifr_addr.sa_family == AF_INET6)
724
- {
725
- struct sockaddr_in6* ipv6Addr = reinterpret_cast<struct sockaddr_in6*>(&ifr[i].ifr_addr);
726
- if(memcmp(&addr, &ipv6Addr->sin6_addr, sizeof(in6_addr)) == 0)
727
- {
728
- index = static_cast<int>(if_nametoindex(ifr[i].ifr_name));
729
- break;
730
- }
731
- }
732
- }
733
- free(ifc.ifc_buf);
734
- }
735
- # endif
736
- }
737
- else // Look for an interface with the given name.
738
- {
739
- index = static_cast<int>(if_nametoindex(name.c_str()));
740
- }
741
- if(index <= 0)
742
- {
743
- // index == 0 if if_nametoindex returned 0, < 0 if name wasn't found
744
- throw Ice::SocketException(__FILE__, __LINE__, index == 0 ? getSocketErrno() : ENXIO);
745
- }
746
- #endif
747
-
748
- return index;
749
- }
750
-
751
- struct in_addr
752
- getInterfaceAddress(const string& name)
753
- {
754
- struct in_addr addr;
755
- addr.s_addr = INADDR_ANY;
756
- if(name.empty())
757
- {
758
- return addr;
759
- }
760
-
761
- if(inet_pton(AF_INET, name.c_str(), &addr) > 0)
762
- {
763
- return addr;
764
- }
765
-
766
- #ifdef _WIN32
767
- IP_ADAPTER_ADDRESSES addrs;
768
- ULONG buflen = 0;
769
- if(::GetAdaptersAddresses(AF_INET, 0, 0, &addrs, &buflen) == ERROR_BUFFER_OVERFLOW)
770
- {
771
- PIP_ADAPTER_ADDRESSES paddrs;
772
- char* buf = new char[buflen];
773
- paddrs = reinterpret_cast<PIP_ADAPTER_ADDRESSES>(buf);
774
- if(::GetAdaptersAddresses(AF_INET, 0, 0, paddrs, &buflen) == NO_ERROR)
775
- {
776
- while(paddrs)
777
- {
778
- //
779
- // Don't need to pass a wide string converter as the wide string come
780
- // from Windows API.
781
- //
782
- if(wstringToString(paddrs->FriendlyName, getProcessStringConverter()) == name)
783
- {
784
- struct sockaddr_in addrin;
785
- memcpy(&addrin, paddrs->FirstUnicastAddress->Address.lpSockaddr,
786
- paddrs->FirstUnicastAddress->Address.iSockaddrLength);
787
- delete[] buf;
788
- return addrin.sin_addr;
789
- }
790
- paddrs = paddrs->Next;
791
- }
792
- }
793
- delete[] buf;
794
- }
795
- throw Ice::SocketException(__FILE__, __LINE__, WSAEINVAL);
796
- #else
797
- ifreq if_address;
798
- strcpy(if_address.ifr_name, name.c_str());
799
-
800
- SOCKET fd = createSocketImpl(false, AF_INET);
801
- int rc = ioctl(fd, SIOCGIFADDR, &if_address);
802
- closeSocketNoThrow(fd);
803
- if(rc == SOCKET_ERROR)
804
- {
805
- throw Ice::SocketException(__FILE__, __LINE__, getSocketErrno());
806
- }
807
- return reinterpret_cast<struct sockaddr_in*>(&if_address.ifr_addr)->sin_addr;
808
- #endif
809
- }
810
-
811
- int
812
- getAddressStorageSize(const Address& addr)
813
- {
814
- int size = 0;
815
- if(addr.saStorage.ss_family == AF_INET)
816
- {
817
- size = sizeof(sockaddr_in);
818
- }
819
- else if(addr.saStorage.ss_family == AF_INET6)
820
- {
821
- size = sizeof(sockaddr_in6);
822
- }
823
- return size;
824
- }
825
-
826
- vector<Address>
827
- getLoopbackAddresses(ProtocolSupport protocol, int port = 0)
828
- {
829
- vector<Address> result;
830
-
831
- Address addr;
832
- memset(&addr.saStorage, 0, sizeof(sockaddr_storage));
833
-
834
- //
835
- // We don't use getaddrinfo when host is empty as it's not portable (some old Linux
836
- // versions don't support it).
837
- //
838
- if(protocol != EnableIPv4)
839
- {
840
- addr.saIn6.sin6_family = AF_INET6;
841
- addr.saIn6.sin6_port = htons(port);
842
- addr.saIn6.sin6_addr = in6addr_loopback;
843
- result.push_back(addr);
844
- }
845
- if(protocol != EnableIPv6)
846
- {
847
- addr.saIn.sin_family = AF_INET;
848
- addr.saIn.sin_port = htons(port);
849
- addr.saIn.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
850
- result.push_back(addr);
851
- }
852
- return result;
853
- }
854
-
855
- #endif // #ifndef ICE_OS_UWP
856
-
857
- }
858
-
859
- ReadyCallback::~ReadyCallback()
860
- {
861
- // Out of line to avoid weak vtable
862
- }
863
-
864
- NativeInfo::~NativeInfo()
865
- {
866
- // Out of line to avoid weak vtable
867
- }
868
-
869
- void
870
- NativeInfo::setReadyCallback(const ReadyCallbackPtr& callback)
871
- {
872
- _readyCallback = callback;
873
- }
874
-
875
- #ifdef ICE_USE_IOCP
876
-
877
- IceInternal::AsyncInfo::AsyncInfo(SocketOperation s)
878
- {
879
- ZeroMemory(this, sizeof(AsyncInfo));
880
- status = s;
881
- }
882
-
883
- void
884
- IceInternal::NativeInfo::initialize(HANDLE handle, ULONG_PTR key)
885
- {
886
- _handle = handle;
887
- _key = key;
888
- }
889
-
890
- void
891
- IceInternal::NativeInfo::completed(SocketOperation operation)
892
- {
893
- if(!PostQueuedCompletionStatus(_handle, 0, _key, getAsyncInfo(operation)))
894
- {
895
- throw Ice::SocketException(__FILE__, __LINE__, GetLastError());
896
- }
897
- }
898
-
899
- #elif defined(ICE_OS_UWP)
900
-
901
- void
902
- IceInternal::NativeInfo::queueAction(SocketOperation op, IAsyncAction^ action, bool connect)
903
- {
904
- AsyncInfo* asyncInfo = getAsyncInfo(op);
905
- if(checkIfErrorOrCompleted(op, action, action->Status, connect))
906
- {
907
- asyncInfo->count = 0;
908
- asyncInfo->error = ERROR_SUCCESS;
909
- }
910
- else
911
- {
912
- action->Completed = ref new AsyncActionCompletedHandler(
913
- [=] (IAsyncAction^ info, Windows::Foundation::AsyncStatus status)
914
- {
915
- //
916
- // COMPILERFIX with v141 using operator!= and operator== inside
917
- // a lambda callback triggers a compiler bug, we move the code to
918
- // a seperate private method to workaround the issue.
919
- //
920
- this->queueActionCompleted(op, asyncInfo, info, status);
921
- });
922
- asyncInfo->operation = action;
923
- }
924
- }
925
-
926
- void
927
- IceInternal::NativeInfo::queueActionCompleted(SocketOperation op, AsyncInfo* asyncInfo, IAsyncAction^ info,
928
- Windows::Foundation::AsyncStatus status)
929
- {
930
- if(status != Windows::Foundation::AsyncStatus::Completed)
931
- {
932
- asyncInfo->error = info->ErrorCode.Value;
933
- }
934
- else
935
- {
936
- asyncInfo->error = ERROR_SUCCESS;
937
- }
938
- asyncInfo->count = 0;
939
- completed(op);
940
- }
941
-
942
- void
943
- IceInternal::NativeInfo::queueOperation(SocketOperation op, IAsyncOperation<unsigned int>^ operation)
944
- {
945
- AsyncInfo* info = getAsyncInfo(op);
946
- Windows::Foundation::AsyncStatus status = operation->Status;
947
- if(status == Windows::Foundation::AsyncStatus::Completed)
948
- {
949
- //
950
- // NOTE: it's important to modify the count _before_ calling the completion handler
951
- // since this might not always be called with the connection mutex but from a Windows
952
- // thread pool thread if we chained multiple Async calls (GetGetOutputStreamAsync and
953
- // StoreAsync for example, see the UDPTransceiver implementation). So we can't modify
954
- // the AsyncInfo structure after calling the completed callback.
955
- //
956
- info->count = static_cast<int>(operation->GetResults());
957
- info->error = ERROR_SUCCESS;
958
- _completedHandler(op);
959
- return;
960
- }
961
- else if(!checkIfErrorOrCompleted(op, operation, status))
962
- {
963
- if(!info->completedHandler)
964
- {
965
- info->completedHandler = ref new AsyncOperationCompletedHandler<unsigned int>(
966
- [=] (IAsyncOperation<unsigned int>^ operation, Windows::Foundation::AsyncStatus status)
967
- {
968
- //
969
- // COMPILERFIX with v141 using operator!= and operator== inside
970
- // a lambda callback triggers a compiler bug, we move the code to
971
- // a seperate private method to workaround the issue.
972
- //
973
- this->queueOperationCompleted(op, info, operation, status);
974
- });
975
- }
976
- operation->Completed = info->completedHandler;
977
- info->operation = operation;
978
- }
979
- }
980
-
981
- void
982
- IceInternal::NativeInfo::queueOperationCompleted(SocketOperation op, AsyncInfo* info,
983
- IAsyncOperation<unsigned int>^ operation,
984
- Windows::Foundation::AsyncStatus status)
985
- {
986
- if(status != Windows::Foundation::AsyncStatus::Completed)
987
- {
988
- info->count = 0;
989
- info->error = operation->ErrorCode.Value;
990
- }
991
- else
992
- {
993
- info->count = static_cast<int>(operation->GetResults());
994
- info->error = ERROR_SUCCESS;
995
- }
996
- completed(op);
997
- }
998
-
999
- void
1000
- IceInternal::NativeInfo::setCompletedHandler(SocketOperationCompletedHandler^ handler)
1001
- {
1002
- _completedHandler = handler;
1003
- }
1004
-
1005
- void
1006
- IceInternal::NativeInfo::completed(SocketOperation operation)
1007
- {
1008
- assert(_completedHandler);
1009
- _completedHandler(operation);
1010
- }
1011
-
1012
- bool
1013
- IceInternal::NativeInfo::checkIfErrorOrCompleted(SocketOperation op, IAsyncInfo^ info, Windows::Foundation::AsyncStatus status, bool connect)
1014
- {
1015
- //
1016
- // NOTE: It's important to only check for info->Status once as it
1017
- // might change during the checks below (the Status can be changed
1018
- // by the Windows thread pool concurrently).
1019
- //
1020
- // We consider that a canceled async status is the same as an
1021
- // error. A canceled async status can occur if there's a timeout
1022
- // and the socket is closed.
1023
- //
1024
- if(status == Windows::Foundation::AsyncStatus::Completed)
1025
- {
1026
- _completedHandler(op);
1027
- return true;
1028
- }
1029
- else if (status == Windows::Foundation::AsyncStatus::Started)
1030
- {
1031
- return false;
1032
- }
1033
- else
1034
- {
1035
- if(connect) // Connect
1036
- {
1037
- checkConnectErrorCode(__FILE__, __LINE__, info->ErrorCode.Value);
1038
- }
1039
- else
1040
- {
1041
- checkErrorCode(__FILE__, __LINE__, info->ErrorCode.Value);
1042
- }
1043
- return true; // Prevent compiler warning.
1044
- }
1045
- }
1046
-
1047
- #else
1048
-
1049
- void
1050
- IceInternal::NativeInfo::setNewFd(SOCKET fd)
1051
- {
1052
- assert(_fd == INVALID_SOCKET); // This can only be called once, when the current socket isn't set yet.
1053
- _newFd = fd;
1054
- }
1055
-
1056
- bool
1057
- IceInternal::NativeInfo::newFd()
1058
- {
1059
- if(_newFd == INVALID_SOCKET)
1060
- {
1061
- return false;
1062
- }
1063
- assert(_fd == INVALID_SOCKET);
1064
- swap(_fd, _newFd);
1065
- return true;
1066
- }
1067
-
1068
- #endif
1069
-
1070
- bool
1071
- IceInternal::noMoreFds(int error)
1072
- {
1073
- #if defined(ICE_OS_UWP)
1074
- return error == (int)SocketErrorStatus::TooManyOpenFiles;
1075
- #elif defined(_WIN32)
1076
- return error == WSAEMFILE;
1077
- #else
1078
- return error == EMFILE || error == ENFILE;
1079
- #endif
1080
- }
1081
-
1082
- #if defined(ICE_OS_UWP)
1083
- string
1084
- IceInternal::errorToStringDNS(int)
1085
- {
1086
- return "Host not found";
1087
- }
1088
- #else
1089
- string
1090
- IceInternal::errorToStringDNS(int error)
1091
- {
1092
- # if defined(_WIN32)
1093
- return IceUtilInternal::errorToString(error);
1094
- # else
1095
- return gai_strerror(error);
1096
- # endif
1097
- }
1098
- #endif
1099
-
1100
- #ifdef ICE_OS_UWP
1101
- vector<Address>
1102
- IceInternal::getAddresses(const string& host, int port, ProtocolSupport, Ice::EndpointSelectionType, bool, bool)
1103
- {
1104
- try
1105
- {
1106
- vector<Address> result;
1107
- Address addr;
1108
- if(host.empty())
1109
- {
1110
- addr.host = ref new HostName("localhost");
1111
- }
1112
- else
1113
- {
1114
- //
1115
- // Don't need to pass a wide string converter as the wide string is passed
1116
- // to Windows API.
1117
- //
1118
- addr.host = ref new HostName(ref new String(
1119
- stringToWstring(host,
1120
- getProcessStringConverter()).c_str()));
1121
- }
1122
- stringstream os;
1123
- os << port;
1124
- //
1125
- // Don't need to use any string converter here as the port number use just
1126
- // ASCII characters.
1127
- //
1128
- addr.port = ref new String(stringToWstring(os.str()).c_str());
1129
- result.push_back(addr);
1130
- return result;
1131
- }
1132
- catch(Platform::Exception^ pex)
1133
- {
1134
- throw DNSException(__FILE__, __LINE__, (int)SocketError::GetStatus(pex->HResult), host);
1135
- }
1136
-
1137
- }
1138
- #else
1139
- vector<Address>
1140
- IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol, Ice::EndpointSelectionType selType,
1141
- bool preferIPv6, bool canBlock)
1142
- {
1143
- vector<Address> result;
1144
-
1145
- //
1146
- // We don't use getaddrinfo when host is empty as it's not portable (some old Linux
1147
- // versions don't support it).
1148
- //
1149
- if(host.empty())
1150
- {
1151
- result = getLoopbackAddresses(protocol, port);
1152
- sortAddresses(result, protocol, selType, preferIPv6);
1153
- return result;
1154
- }
1155
-
1156
- Address addr;
1157
- memset(&addr.saStorage, 0, sizeof(sockaddr_storage));
1158
-
1159
- struct addrinfo* info = 0;
1160
- int retry = 5;
1161
-
1162
- struct addrinfo hints = {};
1163
- if(protocol == EnableIPv4)
1164
- {
1165
- hints.ai_family = PF_INET;
1166
- }
1167
- else if(protocol == EnableIPv6)
1168
- {
1169
- hints.ai_family = PF_INET6;
1170
- }
1171
- else
1172
- {
1173
- hints.ai_family = PF_UNSPEC;
1174
- }
1175
-
1176
- if(!canBlock)
1177
- {
1178
- hints.ai_flags = AI_NUMERICHOST;
1179
- }
1180
-
1181
- int rs = 0;
1182
- do
1183
- {
1184
- rs = getaddrinfo(host.c_str(), 0, &hints, &info);
1185
- }
1186
- while(info == 0 && rs == EAI_AGAIN && --retry >= 0);
1187
-
1188
- // In theory, getaddrinfo should only return EAI_NONAME if
1189
- // AI_NUMERICHOST is specified and the host name is not a IP
1190
- // address. However on some platforms (e.g. macOS 10.4.x)
1191
- // EAI_NODATA is also returned so we also check for it.
1192
- # ifdef EAI_NODATA
1193
- if(!canBlock && (rs == EAI_NONAME || rs == EAI_NODATA))
1194
- # else
1195
- if(!canBlock && rs == EAI_NONAME)
1196
- # endif
1197
- {
1198
- return result; // Empty result indicates that a canBlock lookup is necessary.
1199
- }
1200
- else if(rs != 0)
1201
- {
1202
- throw DNSException(__FILE__, __LINE__, rs, host);
1203
- }
1204
-
1205
- for(struct addrinfo* p = info; p != ICE_NULLPTR; p = p->ai_next)
1206
- {
1207
- memcpy(&addr.saStorage, p->ai_addr, p->ai_addrlen);
1208
- if(p->ai_family == PF_INET)
1209
- {
1210
- addr.saIn.sin_port = htons(port);
1211
- }
1212
- else if(p->ai_family == PF_INET6)
1213
- {
1214
- addr.saIn6.sin6_port = htons(port);
1215
- }
1216
-
1217
- bool found = false;
1218
- for(unsigned int i = 0; i < result.size(); ++i)
1219
- {
1220
- if(compareAddress(result[i], addr) == 0)
1221
- {
1222
- found = true;
1223
- break;
1224
- }
1225
- }
1226
- if(!found)
1227
- {
1228
- result.push_back(addr);
1229
- }
1230
- }
1231
-
1232
- freeaddrinfo(info);
1233
-
1234
- if(result.empty())
1235
- {
1236
- throw DNSException(__FILE__, __LINE__, 0, host);
1237
- }
1238
- sortAddresses(result, protocol, selType, preferIPv6);
1239
- return result;
1240
- }
1241
- #endif
1242
-
1243
- #ifdef ICE_OS_UWP
1244
- ProtocolSupport
1245
- IceInternal::getProtocolSupport(const Address&)
1246
- {
1247
- // For UWP, there's no distinction between IPv4 and IPv6 adresses.
1248
- return EnableBoth;
1249
- }
1250
- #else
1251
- ProtocolSupport
1252
- IceInternal::getProtocolSupport(const Address& addr)
1253
- {
1254
- return addr.saStorage.ss_family == AF_INET ? EnableIPv4 : EnableIPv6;
1255
- }
1256
- #endif
1257
-
1258
- Address
1259
- IceInternal::getAddressForServer(const string& host, int port, ProtocolSupport protocol, bool preferIPv6, bool canBlock)
1260
- {
1261
- //
1262
- // We don't use getaddrinfo when host is empty as it's not portable (some old Linux
1263
- // versions don't support it).
1264
- //
1265
- if(host.empty())
1266
- {
1267
- Address addr;
1268
- #ifdef ICE_OS_UWP
1269
- ostringstream os;
1270
- os << port;
1271
- //
1272
- // Don't need to use any string converter here as the port number use just
1273
- // ASCII characters.
1274
- //
1275
- addr.port = ref new String(stringToWstring(os.str()).c_str());
1276
- addr.host = nullptr; // Equivalent of inaddr_any, see doBind implementation.
1277
- #else
1278
- memset(&addr.saStorage, 0, sizeof(sockaddr_storage));
1279
- if(protocol != EnableIPv4)
1280
- {
1281
- addr.saIn6.sin6_family = AF_INET6;
1282
- addr.saIn6.sin6_port = htons(port);
1283
- addr.saIn6.sin6_addr = in6addr_any;
1284
- }
1285
- else
1286
- {
1287
- addr.saIn.sin_family = AF_INET;
1288
- addr.saIn.sin_port = htons(port);
1289
- addr.saIn.sin_addr.s_addr = htonl(INADDR_ANY);
1290
- }
1291
- #endif
1292
- return addr;
1293
- }
1294
- vector<Address> addrs = getAddresses(host, port, protocol, Ice::ICE_ENUM(EndpointSelectionType, Ordered),
1295
- preferIPv6, canBlock);
1296
- return addrs.empty() ? Address() : addrs[0];
1297
- }
1298
-
1299
- int
1300
- IceInternal::compareAddress(const Address& addr1, const Address& addr2)
1301
- {
1302
- #ifdef ICE_OS_UWP
1303
- int o = String::CompareOrdinal(addr1.port, addr2.port);
1304
- if(o != 0)
1305
- {
1306
- return o;
1307
- }
1308
- if(addr1.host == addr2.host)
1309
- {
1310
- return 0;
1311
- }
1312
- if(addr1.host == nullptr)
1313
- {
1314
- return -1;
1315
- }
1316
- if(addr2.host == nullptr)
1317
- {
1318
- return 1;
1319
- }
1320
- return String::CompareOrdinal(addr1.host->RawName, addr2.host->RawName);
1321
- #else
1322
- if(addr1.saStorage.ss_family < addr2.saStorage.ss_family)
1323
- {
1324
- return -1;
1325
- }
1326
- else if(addr2.saStorage.ss_family < addr1.saStorage.ss_family)
1327
- {
1328
- return 1;
1329
- }
1330
-
1331
- if(addr1.saStorage.ss_family == AF_INET)
1332
- {
1333
- if(addr1.saIn.sin_port < addr2.saIn.sin_port)
1334
- {
1335
- return -1;
1336
- }
1337
- else if(addr2.saIn.sin_port < addr1.saIn.sin_port)
1338
- {
1339
- return 1;
1340
- }
1341
-
1342
- if(addr1.saIn.sin_addr.s_addr < addr2.saIn.sin_addr.s_addr)
1343
- {
1344
- return -1;
1345
- }
1346
- else if(addr2.saIn.sin_addr.s_addr < addr1.saIn.sin_addr.s_addr)
1347
- {
1348
- return 1;
1349
- }
1350
- }
1351
- else
1352
- {
1353
- if(addr1.saIn6.sin6_port < addr2.saIn6.sin6_port)
1354
- {
1355
- return -1;
1356
- }
1357
- else if(addr2.saIn6.sin6_port < addr1.saIn6.sin6_port)
1358
- {
1359
- return 1;
1360
- }
1361
-
1362
- int res = memcmp(&addr1.saIn6.sin6_addr, &addr2.saIn6.sin6_addr, sizeof(in6_addr));
1363
- if(res < 0)
1364
- {
1365
- return -1;
1366
- }
1367
- else if(res > 0)
1368
- {
1369
- return 1;
1370
- }
1371
- }
1372
-
1373
- return 0;
1374
- #endif
1375
- }
1376
-
1377
- #ifdef ICE_OS_UWP
1378
- bool
1379
- IceInternal::isIPv6Supported()
1380
- {
1381
- return true;
1382
- }
1383
- #else
1384
- bool
1385
- IceInternal::isIPv6Supported()
1386
- {
1387
- SOCKET fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
1388
- if(fd == INVALID_SOCKET)
1389
- {
1390
- return false;
1391
- }
1392
- else
1393
- {
1394
- closeSocketNoThrow(fd);
1395
- return true;
1396
- }
1397
- }
1398
- #endif
1399
-
1400
- #ifdef ICE_OS_UWP
1401
- SOCKET
1402
- IceInternal::createSocket(bool udp, const Address&)
1403
- {
1404
- return createSocketImpl(udp, 0);
1405
- }
1406
- #else
1407
- SOCKET
1408
- IceInternal::createSocket(bool udp, const Address& addr)
1409
- {
1410
- return createSocketImpl(udp, addr.saStorage.ss_family);
1411
- }
1412
- #endif
1413
-
1414
- #ifndef ICE_OS_UWP
1415
- SOCKET
1416
- IceInternal::createServerSocket(bool udp, const Address& addr, ProtocolSupport protocol)
1417
- {
1418
- SOCKET fd = createSocket(udp, addr);
1419
- if(addr.saStorage.ss_family == AF_INET6 && protocol != EnableIPv4)
1420
- {
1421
- int flag = protocol == EnableIPv6 ? 1 : 0;
1422
- if(setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, reinterpret_cast<char*>(&flag), int(sizeof(int))) == SOCKET_ERROR)
1423
- {
1424
- #ifdef _WIN32
1425
- if(getSocketErrno() == WSAENOPROTOOPT)
1426
- {
1427
- return fd; // Windows XP doesn't support IPV6_V6ONLY
1428
- }
1429
- #endif
1430
- closeSocketNoThrow(fd);
1431
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
1432
- }
1433
- }
1434
- return fd;
1435
- }
1436
- #else
1437
- SOCKET
1438
- IceInternal::createServerSocket(bool udp, const Address& addr, ProtocolSupport)
1439
- {
1440
- return createSocket(udp, addr);
1441
- }
1442
- #endif
1443
-
1444
- void
1445
- IceInternal::closeSocketNoThrow(SOCKET fd)
1446
- {
1447
- #if defined(ICE_OS_UWP)
1448
- //
1449
- // NOTE: StreamSocket::Close or DatagramSocket::Close aren't
1450
- // exposed in C++, you have to delete the socket to close
1451
- // it. According some Microsoft samples, this is safe even if
1452
- // there are still references to the object...
1453
- //
1454
- //fd->Close();
1455
- delete fd;
1456
- #elif defined(_WIN32)
1457
- int error = WSAGetLastError();
1458
- closesocket(fd);
1459
- WSASetLastError(error);
1460
- #else
1461
- int error = errno;
1462
- close(fd);
1463
- errno = error;
1464
- #endif
1465
- }
1466
-
1467
- void
1468
- IceInternal::closeSocket(SOCKET fd)
1469
- {
1470
- #if defined(ICE_OS_UWP)
1471
- //
1472
- // NOTE: StreamSocket::Close or DatagramSocket::Close aren't
1473
- // exposed in C++, you have to delete the socket to close
1474
- // it. According some Microsoft samples, this is safe even if
1475
- // there are still references to the object...
1476
- //
1477
- //fd->Close();
1478
- delete fd;
1479
- #elif defined(_WIN32)
1480
- int error = WSAGetLastError();
1481
- if(closesocket(fd) == SOCKET_ERROR)
1482
- {
1483
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
1484
- }
1485
- WSASetLastError(error);
1486
- #else
1487
- int error = errno;
1488
-
1489
- # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1490
- //
1491
- // FreeBSD returns ECONNRESET if the underlying object was
1492
- // a stream socket that was shut down by the peer before all
1493
- // pending data was delivered.
1494
- //
1495
- if(close(fd) == SOCKET_ERROR && getSocketErrno() != ECONNRESET)
1496
- # else
1497
- if(close(fd) == SOCKET_ERROR)
1498
- # endif
1499
- {
1500
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
1501
- }
1502
- errno = error;
1503
- #endif
1504
- }
1505
-
1506
- string
1507
- IceInternal::addrToString(const Address& addr)
1508
- {
1509
- ostringstream s;
1510
- s << inetAddrToString(addr) << ':' << getPort(addr);
1511
- return s.str();
1512
- }
1513
-
1514
- void
1515
- IceInternal::fdToLocalAddress(SOCKET fd, Address& addr)
1516
- {
1517
- #ifndef ICE_OS_UWP
1518
- socklen_t len = static_cast<socklen_t>(sizeof(sockaddr_storage));
1519
- if(getsockname(fd, &addr.sa, &len) == SOCKET_ERROR)
1520
- {
1521
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
1522
- }
1523
- #else
1524
- StreamSocket^ stream = dynamic_cast<StreamSocket^>(fd);
1525
- if(stream)
1526
- {
1527
- addr.host = stream->Information->LocalAddress;
1528
- addr.port = stream->Information->LocalPort;
1529
- }
1530
- DatagramSocket^ datagram = dynamic_cast<DatagramSocket^>(fd);
1531
- if(datagram)
1532
- {
1533
- addr.host = datagram->Information->LocalAddress;
1534
- addr.port = datagram->Information->LocalPort;
1535
- }
1536
- #endif
1537
- }
1538
-
1539
- bool
1540
- IceInternal::fdToRemoteAddress(SOCKET fd, Address& addr)
1541
- {
1542
- #ifndef ICE_OS_UWP
1543
- socklen_t len = static_cast<socklen_t>(sizeof(sockaddr_storage));
1544
- if(getpeername(fd, &addr.sa, &len) == SOCKET_ERROR)
1545
- {
1546
- if(notConnected())
1547
- {
1548
- return false;
1549
- }
1550
- else
1551
- {
1552
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
1553
- }
1554
- }
1555
-
1556
- return true;
1557
- #else
1558
- StreamSocket^ stream = dynamic_cast<StreamSocket^>(fd);
1559
- if(stream != nullptr)
1560
- {
1561
- addr.host = stream->Information->RemoteAddress;
1562
- addr.port = stream->Information->RemotePort;
1563
- }
1564
- DatagramSocket^ datagram = dynamic_cast<DatagramSocket^>(fd);
1565
- if(datagram != nullptr)
1566
- {
1567
- addr.host = datagram->Information->RemoteAddress;
1568
- addr.port = datagram->Information->RemotePort;
1569
- }
1570
- return addr.host != nullptr;
1571
- #endif
1572
- }
1573
-
1574
- std::string
1575
- IceInternal::fdToString(SOCKET fd, const NetworkProxyPtr& proxy, const Address& target)
1576
- {
1577
- if(fd == INVALID_SOCKET)
1578
- {
1579
- return "<closed>";
1580
- }
1581
-
1582
- ostringstream s;
1583
-
1584
- Address remoteAddr;
1585
- bool peerConnected = fdToRemoteAddress(fd, remoteAddr);
1586
-
1587
- #ifdef _WIN32
1588
- if(!peerConnected)
1589
- {
1590
- //
1591
- // The local address is only accessible with connected sockets on Windows.
1592
- //
1593
- s << "local address = <not available>";
1594
- }
1595
- else
1596
- #endif
1597
- {
1598
- Address localAddr;
1599
- fdToLocalAddress(fd, localAddr);
1600
- s << "local address = " << addrToString(localAddr);
1601
- }
1602
-
1603
- if(proxy)
1604
- {
1605
- if(!peerConnected)
1606
- {
1607
- remoteAddr = proxy->getAddress();
1608
- }
1609
- s << "\n" + proxy->getName() + " proxy address = " << addrToString(remoteAddr);
1610
- s << "\nremote address = " << addrToString(target);
1611
- }
1612
- else
1613
- {
1614
- if(!peerConnected)
1615
- {
1616
- remoteAddr = target;
1617
- }
1618
- s << "\nremote address = " << addrToString(remoteAddr);
1619
- }
1620
-
1621
- return s.str();
1622
- }
1623
-
1624
- std::string
1625
- IceInternal::fdToString(SOCKET fd)
1626
- {
1627
- if(fd == INVALID_SOCKET)
1628
- {
1629
- return "<closed>";
1630
- }
1631
-
1632
- Address localAddr;
1633
- fdToLocalAddress(fd, localAddr);
1634
-
1635
- Address remoteAddr;
1636
- bool peerConnected = fdToRemoteAddress(fd, remoteAddr);
1637
-
1638
- return addressesToString(localAddr, remoteAddr, peerConnected);
1639
- }
1640
-
1641
- void
1642
- IceInternal::fdToAddressAndPort(SOCKET fd, string& localAddress, int& localPort, string& remoteAddress, int& remotePort)
1643
- {
1644
- if(fd == INVALID_SOCKET)
1645
- {
1646
- localAddress.clear();
1647
- remoteAddress.clear();
1648
- localPort = -1;
1649
- remotePort = -1;
1650
- return;
1651
- }
1652
-
1653
- Address localAddr;
1654
- fdToLocalAddress(fd, localAddr);
1655
- addrToAddressAndPort(localAddr, localAddress, localPort);
1656
-
1657
- Address remoteAddr;
1658
- if(fdToRemoteAddress(fd, remoteAddr))
1659
- {
1660
- addrToAddressAndPort(remoteAddr, remoteAddress, remotePort);
1661
- }
1662
- else
1663
- {
1664
- remoteAddress.clear();
1665
- remotePort = -1;
1666
- }
1667
- }
1668
-
1669
- void
1670
- IceInternal::addrToAddressAndPort(const Address& addr, string& address, int& port)
1671
- {
1672
- address = inetAddrToString(addr);
1673
- port = getPort(addr);
1674
- }
1675
-
1676
- std::string
1677
- IceInternal::addressesToString(const Address& localAddr, const Address& remoteAddr, bool peerConnected)
1678
- {
1679
- ostringstream s;
1680
- s << "local address = " << addrToString(localAddr);
1681
- if(peerConnected)
1682
- {
1683
- s << "\nremote address = " << addrToString(remoteAddr);
1684
- }
1685
- else
1686
- {
1687
- s << "\nremote address = <not connected>";
1688
- }
1689
- return s.str();
1690
- }
1691
-
1692
- bool
1693
- IceInternal::isAddressValid(const Address& addr)
1694
- {
1695
- #ifndef ICE_OS_UWP
1696
- return addr.saStorage.ss_family != AF_UNSPEC;
1697
- #else
1698
- return addr.host != nullptr || addr.port != nullptr;
1699
- #endif
1700
- }
1701
-
1702
- #ifdef ICE_OS_UWP
1703
- vector<string>
1704
- IceInternal::getHostsForEndpointExpand(const string& host, ProtocolSupport protocolSupport, bool includeLoopback)
1705
- {
1706
- vector<string> hosts;
1707
- if(host.empty() || host == "0.0.0.0" || host == "::" || host == "0:0:0:0:0:0:0:0")
1708
- {
1709
- for(IIterator<HostName^>^ it = NetworkInformation::GetHostNames()->First(); it->HasCurrent; it->MoveNext())
1710
- {
1711
- HostName^ h = it->Current;
1712
- if(h->IPInformation != nullptr && h->IPInformation->NetworkAdapter != nullptr)
1713
- {
1714
- hosts.push_back(wstringToString(h->CanonicalName->Data(), getProcessStringConverter()));
1715
- }
1716
- }
1717
- if(hosts.empty() || includeLoopback)
1718
- {
1719
- if(protocolSupport != EnableIPv6)
1720
- {
1721
- hosts.push_back("127.0.0.1");
1722
- }
1723
- if(protocolSupport != EnableIPv4)
1724
- {
1725
- hosts.push_back("::1");
1726
- }
1727
- }
1728
- }
1729
- return hosts;
1730
- }
1731
-
1732
- vector<string>
1733
- IceInternal::getInterfacesForMulticast(const string& intf, ProtocolSupport)
1734
- {
1735
- vector<string> interfaces;
1736
- if(intf.empty() || intf == "0.0.0.0" || intf == "::" || intf == "0:0:0:0:0:0:0:0")
1737
- {
1738
- for(IIterator<HostName^>^ it = NetworkInformation::GetHostNames()->First(); it->HasCurrent; it->MoveNext())
1739
- {
1740
- HostName^ h = it->Current;
1741
- if(h->IPInformation != nullptr && h->IPInformation->NetworkAdapter != nullptr)
1742
- {
1743
- string s = wstringToString(h->CanonicalName->Data(), getProcessStringConverter());
1744
- if(find(interfaces.begin(), interfaces.end(), s) == interfaces.end())
1745
- {
1746
- interfaces.push_back(s);
1747
- }
1748
- }
1749
- }
1750
- }
1751
- if(interfaces.empty())
1752
- {
1753
- interfaces.push_back(intf);
1754
- }
1755
- return interfaces;
1756
- }
1757
- #else
1758
- vector<string>
1759
- IceInternal::getHostsForEndpointExpand(const string& host, ProtocolSupport protocolSupport, bool includeLoopback)
1760
- {
1761
- vector<string> hosts;
1762
- bool ipv4Wildcard = false;
1763
- if(isWildcard(host, protocolSupport, ipv4Wildcard))
1764
- {
1765
- vector<Address> addrs = getLocalAddresses(ipv4Wildcard ? EnableIPv4 : protocolSupport, includeLoopback, false);
1766
- for(vector<Address>::const_iterator p = addrs.begin(); p != addrs.end(); ++p)
1767
- {
1768
- //
1769
- // NOTE: We don't publish link-local addresses as in most cases
1770
- // these are not desired to be published and in some cases
1771
- // will not work without extra configuration.
1772
- //
1773
- if(!isLinklocal(*p))
1774
- {
1775
- hosts.push_back(inetAddrToString(*p));
1776
- }
1777
- }
1778
- if(hosts.empty())
1779
- {
1780
- // Return loopback if no other local addresses are available.
1781
- addrs = getLoopbackAddresses(protocolSupport);
1782
- for(vector<Address>::const_iterator p = addrs.begin(); p != addrs.end(); ++p)
1783
- {
1784
- hosts.push_back(inetAddrToString(*p));
1785
- }
1786
- }
1787
- }
1788
- return hosts; // An empty host list indicates to just use the given host.
1789
- }
1790
-
1791
- vector<string>
1792
- IceInternal::getInterfacesForMulticast(const string& intf, ProtocolSupport protocolSupport)
1793
- {
1794
- vector<string> interfaces;
1795
- bool ipv4Wildcard = false;
1796
- if(isWildcard(intf, protocolSupport, ipv4Wildcard))
1797
- {
1798
- vector<Address> addrs = getLocalAddresses(ipv4Wildcard ? EnableIPv4 : protocolSupport, true, true);
1799
- for(vector<Address>::const_iterator p = addrs.begin(); p != addrs.end(); ++p)
1800
- {
1801
- interfaces.push_back(inetAddrToString(*p)); // We keep link local addresses for multicast
1802
- }
1803
- }
1804
- if(interfaces.empty())
1805
- {
1806
- interfaces.push_back(intf);
1807
- }
1808
- return interfaces;
1809
- }
1810
- #endif
1811
-
1812
- string
1813
- IceInternal::inetAddrToString(const Address& ss)
1814
- {
1815
- #ifndef ICE_OS_UWP
1816
- int size = getAddressStorageSize(ss);
1817
- if(size == 0)
1818
- {
1819
- return "";
1820
- }
1821
-
1822
- char namebuf[1024];
1823
- namebuf[0] = '\0';
1824
- getnameinfo(&ss.sa, static_cast<socklen_t>(size), namebuf, static_cast<socklen_t>(sizeof(namebuf)), 0, 0,
1825
- NI_NUMERICHOST);
1826
- return string(namebuf);
1827
- #else
1828
- if(ss.host == nullptr)
1829
- {
1830
- return "";
1831
- }
1832
- else
1833
- {
1834
- //
1835
- // Don't need to pass a wide string converter as the wide string come
1836
- // from Windows API.
1837
- //
1838
- return wstringToString(ss.host->RawName->Data(), getProcessStringConverter());
1839
- }
1840
- #endif
1841
- }
1842
-
1843
- int
1844
- IceInternal::getPort(const Address& addr)
1845
- {
1846
- #ifndef ICE_OS_UWP
1847
- if(addr.saStorage.ss_family == AF_INET)
1848
- {
1849
- return ntohs(addr.saIn.sin_port);
1850
- }
1851
- else if(addr.saStorage.ss_family == AF_INET6)
1852
- {
1853
- return ntohs(addr.saIn6.sin6_port);
1854
- }
1855
- else
1856
- {
1857
- return -1;
1858
- }
1859
- #else
1860
- IceUtil::Int64 port = 0;
1861
- //
1862
- // Don't need to use any string converter here as the port number use just ASCII characters.
1863
- //
1864
- if(addr.port == nullptr || !IceUtilInternal::stringToInt64(wstringToString(addr.port->Data()), port))
1865
- {
1866
- return -1;
1867
- }
1868
- return static_cast<int>(port);
1869
- #endif
1870
- }
1871
-
1872
- void
1873
- IceInternal::setPort(Address& addr, int port)
1874
- {
1875
- #ifndef ICE_OS_UWP
1876
- if(addr.saStorage.ss_family == AF_INET)
1877
- {
1878
- addr.saIn.sin_port = htons(port);
1879
- }
1880
- else
1881
- {
1882
- assert(addr.saStorage.ss_family == AF_INET6);
1883
- addr.saIn6.sin6_port = htons(port);
1884
- }
1885
- #else
1886
- ostringstream os;
1887
- os << port;
1888
- //
1889
- // Don't need to use any string converter here as the port number use just
1890
- // ASCII characters.
1891
- //
1892
- addr.port = ref new String(stringToWstring(os.str()).c_str());
1893
- #endif
1894
- }
1895
-
1896
- bool
1897
- IceInternal::isMulticast(const Address& addr)
1898
- {
1899
- #ifndef ICE_OS_UWP
1900
- if(addr.saStorage.ss_family == AF_INET)
1901
- {
1902
- return IN_MULTICAST(ntohl(addr.saIn.sin_addr.s_addr));
1903
- }
1904
- else if(addr.saStorage.ss_family == AF_INET6)
1905
- {
1906
- return IN6_IS_ADDR_MULTICAST(&addr.saIn6.sin6_addr);
1907
- }
1908
- #else
1909
- if(addr.host == nullptr)
1910
- {
1911
- return false;
1912
- }
1913
- //
1914
- // Don't need to use string converters here, this is just to do a local
1915
- // comparison to find if the address is multicast.
1916
- //
1917
- string host = wstringToString(addr.host->RawName->Data());
1918
- string ip = IceUtilInternal::toUpper(host);
1919
- vector<string> tokens;
1920
- IceUtilInternal::splitString(ip, ".", tokens);
1921
- if(tokens.size() == 4)
1922
- {
1923
- IceUtil::Int64 j;
1924
- if(IceUtilInternal::stringToInt64(tokens[0], j))
1925
- {
1926
- if(j >= 233 && j <= 239)
1927
- {
1928
- return true;
1929
- }
1930
- }
1931
- }
1932
- if(ip.find("::") != string::npos)
1933
- {
1934
- return ip.compare(0, 2, "FF") == 0;
1935
- }
1936
- #endif
1937
- return false;
1938
- }
1939
-
1940
- void
1941
- IceInternal::setTcpBufSize(SOCKET fd, const ProtocolInstancePtr& instance)
1942
- {
1943
- assert(fd != INVALID_SOCKET);
1944
-
1945
- //
1946
- // By default, on Windows we use a 128KB buffer size. On Unix
1947
- // platforms, we use the system defaults.
1948
- //
1949
- #ifdef _WIN32
1950
- const int dfltBufSize = 128 * 1024;
1951
- #else
1952
- const int dfltBufSize = 0;
1953
- #endif
1954
- Int rcvSize = instance->properties()->getPropertyAsIntWithDefault("Ice.TCP.RcvSize", dfltBufSize);
1955
- Int sndSize = instance->properties()->getPropertyAsIntWithDefault("Ice.TCP.SndSize", dfltBufSize);
1956
-
1957
- setTcpBufSize(fd, rcvSize, sndSize, instance);
1958
- }
1959
-
1960
- void
1961
- IceInternal::setTcpBufSize(SOCKET fd, int rcvSize, int sndSize, const ProtocolInstancePtr& instance)
1962
- {
1963
- assert(fd != INVALID_SOCKET);
1964
-
1965
- if(rcvSize > 0)
1966
- {
1967
- //
1968
- // Try to set the buffer size. The kernel will silently adjust
1969
- // the size to an acceptable value. Then read the size back to
1970
- // get the size that was actually set.
1971
- //
1972
- setRecvBufferSize(fd, rcvSize);
1973
- int size = getRecvBufferSize(fd);
1974
- if(size > 0 && size < rcvSize)
1975
- {
1976
- // Warn if the size that was set is less than the requested size and
1977
- // we have not already warned.
1978
- BufSizeWarnInfo winfo = instance->getBufSizeWarn(TCPEndpointType);
1979
- if(!winfo.rcvWarn || rcvSize != winfo.rcvSize)
1980
- {
1981
- Ice::Warning out(instance->logger());
1982
- out << "TCP receive buffer size: requested size of " << rcvSize << " adjusted to " << size;
1983
- instance->setRcvBufSizeWarn(TCPEndpointType, rcvSize);
1984
- }
1985
- }
1986
- }
1987
-
1988
- if(sndSize > 0)
1989
- {
1990
- //
1991
- // Try to set the buffer size. The kernel will silently adjust
1992
- // the size to an acceptable value. Then read the size back to
1993
- // get the size that was actually set.
1994
- //
1995
- setSendBufferSize(fd, sndSize);
1996
- int size = getSendBufferSize(fd);
1997
- if(size > 0 && size < sndSize)
1998
- {
1999
- // Warn if the size that was set is less than the requested size and
2000
- // we have not already warned.
2001
- BufSizeWarnInfo winfo = instance->getBufSizeWarn(TCPEndpointType);
2002
- if(!winfo.sndWarn || sndSize != winfo.sndSize)
2003
- {
2004
- Ice::Warning out(instance->logger());
2005
- out << "TCP send buffer size: requested size of " << sndSize << " adjusted to " << size;
2006
- instance->setSndBufSizeWarn(TCPEndpointType, sndSize);
2007
- }
2008
- }
2009
- }
2010
- }
2011
-
2012
- #ifdef ICE_OS_UWP
2013
- void
2014
- IceInternal::setBlock(SOCKET fd, bool)
2015
- {
2016
- }
2017
- #else
2018
- void
2019
- IceInternal::setBlock(SOCKET fd, bool block)
2020
- {
2021
- #ifdef _WIN32
2022
- if(block)
2023
- {
2024
- unsigned long arg = 0;
2025
- if(ioctlsocket(fd, FIONBIO, &arg) == SOCKET_ERROR)
2026
- {
2027
- closeSocketNoThrow(fd);
2028
- throw SocketException(__FILE__, __LINE__, WSAGetLastError());
2029
- }
2030
- }
2031
- else
2032
- {
2033
- unsigned long arg = 1;
2034
- if(ioctlsocket(fd, FIONBIO, &arg) == SOCKET_ERROR)
2035
- {
2036
- closeSocketNoThrow(fd);
2037
- throw SocketException(__FILE__, __LINE__, WSAGetLastError());
2038
- }
2039
- }
2040
- #else
2041
- if(block)
2042
- {
2043
- int flags = fcntl(fd, F_GETFL);
2044
- flags &= ~O_NONBLOCK;
2045
- if(fcntl(fd, F_SETFL, flags) == SOCKET_ERROR)
2046
- {
2047
- closeSocketNoThrow(fd);
2048
- throw SocketException(__FILE__, __LINE__, errno);
2049
- }
2050
- }
2051
- else
2052
- {
2053
- int flags = fcntl(fd, F_GETFL);
2054
- flags |= O_NONBLOCK;
2055
- if(fcntl(fd, F_SETFL, flags) == SOCKET_ERROR)
2056
- {
2057
- closeSocketNoThrow(fd);
2058
- throw SocketException(__FILE__, __LINE__, errno);
2059
- }
2060
- }
2061
- #endif
2062
- }
2063
- #endif
2064
-
2065
- void
2066
- IceInternal::setSendBufferSize(SOCKET fd, int sz)
2067
- {
2068
- #ifndef ICE_OS_UWP
2069
- if(setsockopt(fd, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char*>(&sz), int(sizeof(int))) == SOCKET_ERROR)
2070
- {
2071
- closeSocketNoThrow(fd);
2072
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2073
- }
2074
- #else
2075
- StreamSocket^ stream = dynamic_cast<StreamSocket^>(fd);
2076
- if(stream != nullptr)
2077
- {
2078
- stream->Control->OutboundBufferSizeInBytes = sz;
2079
- }
2080
- #endif
2081
- }
2082
-
2083
- int
2084
- IceInternal::getSendBufferSize(SOCKET fd)
2085
- {
2086
- #ifndef ICE_OS_UWP
2087
- int sz;
2088
- socklen_t len = sizeof(sz);
2089
- if(getsockopt(fd, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char*>(&sz), &len) == SOCKET_ERROR ||
2090
- static_cast<unsigned int>(len) != sizeof(sz))
2091
- {
2092
- closeSocketNoThrow(fd);
2093
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2094
- }
2095
- return sz;
2096
- #else
2097
- StreamSocket^ stream = dynamic_cast<StreamSocket^>(fd);
2098
- if(stream != nullptr)
2099
- {
2100
- return stream->Control->OutboundBufferSizeInBytes;
2101
- }
2102
- return 0; // Not supported
2103
- #endif
2104
- }
2105
-
2106
- #ifdef ICE_OS_UWP
2107
- void
2108
- IceInternal::setRecvBufferSize(SOCKET, int)
2109
- {
2110
- }
2111
- #else
2112
- void
2113
- IceInternal::setRecvBufferSize(SOCKET fd, int sz)
2114
- {
2115
- if(setsockopt(fd, SOL_SOCKET, SO_RCVBUF, reinterpret_cast<char*>(&sz), int(sizeof(int))) == SOCKET_ERROR)
2116
- {
2117
- closeSocketNoThrow(fd);
2118
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2119
- }
2120
- }
2121
- #endif
2122
-
2123
- int
2124
- IceInternal::getRecvBufferSize(SOCKET fd)
2125
- {
2126
- #ifndef ICE_OS_UWP
2127
- int sz;
2128
- socklen_t len = sizeof(sz);
2129
- if(getsockopt(fd, SOL_SOCKET, SO_RCVBUF, reinterpret_cast<char*>(&sz), &len) == SOCKET_ERROR ||
2130
- static_cast<unsigned int>(len) != sizeof(sz))
2131
- {
2132
- closeSocketNoThrow(fd);
2133
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2134
- }
2135
- return sz;
2136
- #else
2137
- return 0; // Not supported
2138
- #endif
2139
- }
2140
-
2141
- #ifndef ICE_OS_UWP
2142
- void
2143
- IceInternal::setMcastGroup(SOCKET fd, const Address& group, const string& intf)
2144
- {
2145
- vector<string> interfaces = getInterfacesForMulticast(intf, getProtocolSupport(group));
2146
- set<int> indexes;
2147
- for(vector<string>::const_iterator p = interfaces.begin(); p != interfaces.end(); ++p)
2148
- {
2149
- int rc = 0;
2150
- if(group.saStorage.ss_family == AF_INET)
2151
- {
2152
- struct ip_mreq mreq;
2153
- mreq.imr_multiaddr = group.saIn.sin_addr;
2154
- mreq.imr_interface = getInterfaceAddress(*p);
2155
- rc = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, reinterpret_cast<char*>(&mreq), int(sizeof(mreq)));
2156
- }
2157
- else
2158
- {
2159
- int index = getInterfaceIndex(*p);
2160
- if(indexes.find(index) == indexes.end()) // Don't join twice the same interface (if it has multiple IPs)
2161
- {
2162
- indexes.insert(index);
2163
- struct ipv6_mreq mreq;
2164
- mreq.ipv6mr_multiaddr = group.saIn6.sin6_addr;
2165
- mreq.ipv6mr_interface = static_cast<unsigned int>(index);
2166
- rc = setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, reinterpret_cast<char*>(&mreq), int(sizeof(mreq)));
2167
- }
2168
- }
2169
- if(rc == SOCKET_ERROR)
2170
- {
2171
- closeSocketNoThrow(fd);
2172
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2173
- }
2174
- }
2175
- }
2176
- #else
2177
- void
2178
- IceInternal::setMcastGroup(SOCKET fd, const Address& group, const string&)
2179
- {
2180
- try
2181
- {
2182
- //
2183
- // NOTE: UWP mcast interface is set earlier in doBind.
2184
- //
2185
- safe_cast<DatagramSocket^>(fd)->JoinMulticastGroup(group.host);
2186
-
2187
- //
2188
- // BUGFIX DatagramSocket will not recive any messages from a multicast group if the
2189
- // messages originate in the same host until the socket is used to send at least one
2190
- // message. We send a valiate connection message that the peers will ignore to workaround
2191
- // the issue.
2192
- //
2193
- auto out = IceInternal::runSync(safe_cast<DatagramSocket^>(fd)->GetOutputStreamAsync(group.host, group.port));
2194
- auto writer = ref new DataWriter(out);
2195
-
2196
- OutputStream os;
2197
- os.write(magic[0]);
2198
- os.write(magic[1]);
2199
- os.write(magic[2]);
2200
- os.write(magic[3]);
2201
- os.write(currentProtocol);
2202
- os.write(currentProtocolEncoding);
2203
- os.write(validateConnectionMsg);
2204
- os.write(static_cast<Byte>(0)); // Compression status (always zero for validate connection).
2205
- os.write(headerSize); // Message size.
2206
- os.i = os.b.begin();
2207
-
2208
- writer->WriteBytes(ref new Array<unsigned char>(&*os.i, static_cast<unsigned int>(headerSize)));
2209
-
2210
- IceInternal::runSync(writer->StoreAsync());
2211
- }
2212
- catch(Platform::Exception^ pex)
2213
- {
2214
- throw SocketException(__FILE__, __LINE__, (int)SocketError::GetStatus(pex->HResult));
2215
- }
2216
- }
2217
- #endif
2218
-
2219
- #ifdef ICE_OS_UWP
2220
- void
2221
- IceInternal::setMcastInterface(SOCKET, const string&, const Address&)
2222
- {
2223
- }
2224
- #else
2225
- void
2226
- IceInternal::setMcastInterface(SOCKET fd, const string& intf, const Address& addr)
2227
- {
2228
- int rc;
2229
- if(addr.saStorage.ss_family == AF_INET)
2230
- {
2231
- struct in_addr iface = getInterfaceAddress(intf);
2232
- rc = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, reinterpret_cast<char*>(&iface), int(sizeof(iface)));
2233
- }
2234
- else
2235
- {
2236
- int interfaceNum = getInterfaceIndex(intf);
2237
- rc = setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, reinterpret_cast<char*>(&interfaceNum), int(sizeof(int)));
2238
- }
2239
- if(rc == SOCKET_ERROR)
2240
- {
2241
- closeSocketNoThrow(fd);
2242
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2243
- }
2244
- }
2245
- #endif
2246
-
2247
- #ifdef ICE_OS_UWP
2248
- void
2249
- IceInternal::setMcastTtl(SOCKET, int, const Address&)
2250
- {
2251
- }
2252
- #else
2253
- void
2254
- IceInternal::setMcastTtl(SOCKET fd, int ttl, const Address& addr)
2255
- {
2256
- int rc;
2257
- if(addr.saStorage.ss_family == AF_INET)
2258
- {
2259
- rc = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, reinterpret_cast<char*>(&ttl), int(sizeof(int)));
2260
- }
2261
- else
2262
- {
2263
- rc = setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, reinterpret_cast<char*>(&ttl), int(sizeof(int)));
2264
- }
2265
- if(rc == SOCKET_ERROR)
2266
- {
2267
- closeSocketNoThrow(fd);
2268
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2269
- }
2270
- }
2271
- #endif
2272
-
2273
- #ifdef ICE_OS_UWP
2274
- void
2275
- IceInternal::setReuseAddress(SOCKET, bool)
2276
- {
2277
- }
2278
- #else
2279
- void
2280
- IceInternal::setReuseAddress(SOCKET fd, bool reuse)
2281
- {
2282
- int flag = reuse ? 1 : 0;
2283
- if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*>(&flag), int(sizeof(int))) == SOCKET_ERROR)
2284
- {
2285
- closeSocketNoThrow(fd);
2286
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2287
- }
2288
- }
2289
- #endif
2290
-
2291
- #ifdef ICE_OS_UWP
2292
- namespace
2293
- {
2294
-
2295
- void
2296
- checkResultAndWait(IAsyncAction^ action)
2297
- {
2298
- auto status = action->Status;
2299
- switch(status)
2300
- {
2301
- case Windows::Foundation::AsyncStatus::Started:
2302
- {
2303
- promise<HRESULT> p;
2304
- action->Completed = ref new AsyncActionCompletedHandler(
2305
- [&p] (IAsyncAction^ action, Windows::Foundation::AsyncStatus status)
2306
- {
2307
- p.set_value(status != Windows::Foundation::AsyncStatus::Completed ? action->ErrorCode.Value : 0);
2308
- });
2309
-
2310
- HRESULT result = p.get_future().get();
2311
- if(result)
2312
- {
2313
- checkErrorCode(__FILE__, __LINE__, result);
2314
- }
2315
- break;
2316
- }
2317
- case Windows::Foundation::AsyncStatus::Error:
2318
- {
2319
- checkErrorCode(__FILE__, __LINE__, action->ErrorCode.Value);
2320
- break;
2321
- }
2322
- default:
2323
- {
2324
- break;
2325
- }
2326
- }
2327
- }
2328
-
2329
- }
2330
- #endif
2331
-
2332
- #ifdef ICE_OS_UWP
2333
- Address
2334
- IceInternal::doBind(SOCKET fd, const Address& addr, const string& intf)
2335
- {
2336
- Address local;
2337
- try
2338
- {
2339
- StreamSocketListener^ listener = dynamic_cast<StreamSocketListener^>(fd);
2340
- if(listener != nullptr)
2341
- {
2342
- if(addr.host == nullptr) // inaddr_any
2343
- {
2344
- checkResultAndWait(listener->BindServiceNameAsync(addr.port));
2345
- }
2346
- else
2347
- {
2348
- checkResultAndWait(listener->BindEndpointAsync(addr.host, addr.port));
2349
- }
2350
- local.host = addr.host;
2351
- local.port = listener->Information->LocalPort;
2352
- }
2353
-
2354
- DatagramSocket^ datagram = dynamic_cast<DatagramSocket^>(fd);
2355
- if(datagram != nullptr)
2356
- {
2357
- if(addr.host == nullptr) // inaddr_any
2358
- {
2359
- NetworkAdapter^ adapter;
2360
- if(!intf.empty())
2361
- {
2362
- auto s = ref new String(Ice::stringToWstring(intf).c_str());
2363
- auto profiles = NetworkInformation::GetConnectionProfiles();
2364
- for(auto i = profiles->First(); adapter == nullptr && i->HasCurrent; i->MoveNext())
2365
- {
2366
- auto names = i->Current->GetNetworkNames();
2367
- for(auto j = names->First(); adapter == nullptr && j->HasCurrent; j->MoveNext())
2368
- {
2369
- if(j->Current->Equals(s))
2370
- {
2371
- adapter = i->Current->NetworkAdapter;
2372
- }
2373
- }
2374
- }
2375
- }
2376
-
2377
- if(adapter)
2378
- {
2379
- checkResultAndWait(datagram->BindServiceNameAsync(addr.port, adapter));
2380
- }
2381
- else
2382
- {
2383
- checkResultAndWait(datagram->BindServiceNameAsync(addr.port));
2384
- }
2385
- }
2386
- else
2387
- {
2388
- checkResultAndWait(datagram->BindEndpointAsync(addr.host, addr.port));
2389
- }
2390
- local.host = datagram->Information->LocalAddress;
2391
- local.port = datagram->Information->LocalPort;
2392
- }
2393
- }
2394
- catch(const Ice::SocketException&)
2395
- {
2396
- closeSocketNoThrow(fd);
2397
- throw;
2398
- }
2399
- return local;
2400
- }
2401
- #else
2402
- Address
2403
- IceInternal::doBind(SOCKET fd, const Address& addr, const string&)
2404
- {
2405
- int size = getAddressStorageSize(addr);
2406
- assert(size != 0);
2407
-
2408
- if(::bind(fd, &addr.sa, static_cast<socklen_t>(size)) == SOCKET_ERROR)
2409
- {
2410
- closeSocketNoThrow(fd);
2411
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2412
- }
2413
-
2414
- Address local;
2415
- socklen_t len = static_cast<socklen_t>(sizeof(sockaddr_storage));
2416
- # ifdef NDEBUG
2417
- getsockname(fd, &local.sa, &len);
2418
- # else
2419
- int ret = getsockname(fd, &local.sa, &len);
2420
- assert(ret != SOCKET_ERROR);
2421
- # endif
2422
- return local;
2423
- }
2424
- #endif
2425
-
2426
- #ifndef ICE_OS_UWP
2427
-
2428
- Address
2429
- IceInternal::getNumericAddress(const std::string& address)
2430
- {
2431
- vector<Address> addrs = getAddresses(address, 0, EnableBoth, Ice::ICE_ENUM(EndpointSelectionType, Ordered), false,
2432
- false);
2433
- if(addrs.empty())
2434
- {
2435
- return Address();
2436
- }
2437
- else
2438
- {
2439
- return addrs[0];
2440
- }
2441
- }
2442
-
2443
- int
2444
- IceInternal::getSocketErrno()
2445
- {
2446
- #if defined(_WIN32)
2447
- return WSAGetLastError();
2448
- #else
2449
- return errno;
2450
- #endif
2451
- }
2452
-
2453
- bool
2454
- IceInternal::interrupted()
2455
- {
2456
- #ifdef _WIN32
2457
- return WSAGetLastError() == WSAEINTR;
2458
- #else
2459
- # ifdef EPROTO
2460
- return errno == EINTR || errno == EPROTO;
2461
- # else
2462
- return errno == EINTR;
2463
- # endif
2464
- #endif
2465
- }
2466
-
2467
- bool
2468
- IceInternal::acceptInterrupted()
2469
- {
2470
- if(interrupted())
2471
- {
2472
- return true;
2473
- }
2474
-
2475
- #ifdef _WIN32
2476
- int error = WSAGetLastError();
2477
- return error == WSAECONNABORTED ||
2478
- error == WSAECONNRESET ||
2479
- error == WSAETIMEDOUT;
2480
- #else
2481
- return errno == ECONNABORTED ||
2482
- errno == ECONNRESET ||
2483
- errno == ETIMEDOUT;
2484
- #endif
2485
- }
2486
-
2487
- bool
2488
- IceInternal::noBuffers()
2489
- {
2490
- #ifdef _WIN32
2491
- int error = WSAGetLastError();
2492
- return error == WSAENOBUFS ||
2493
- error == WSAEFAULT;
2494
- #else
2495
- return errno == ENOBUFS;
2496
- #endif
2497
- }
2498
-
2499
- bool
2500
- IceInternal::wouldBlock()
2501
- {
2502
- #ifdef _WIN32
2503
- int error = WSAGetLastError();
2504
- return error == WSAEWOULDBLOCK || error == WSA_IO_PENDING || error == ERROR_IO_PENDING;
2505
- #else
2506
- return errno == EAGAIN || errno == EWOULDBLOCK;
2507
- #endif
2508
- }
2509
-
2510
- bool
2511
- IceInternal::connectFailed()
2512
- {
2513
- #if defined(_WIN32)
2514
- int error = WSAGetLastError();
2515
- return error == WSAECONNREFUSED ||
2516
- error == WSAETIMEDOUT ||
2517
- error == WSAENETUNREACH ||
2518
- error == WSAEHOSTUNREACH ||
2519
- error == WSAECONNRESET ||
2520
- error == WSAESHUTDOWN ||
2521
- error == WSAECONNABORTED ||
2522
- error == ERROR_SEM_TIMEOUT ||
2523
- error == ERROR_NETNAME_DELETED;
2524
- #else
2525
- return errno == ECONNREFUSED ||
2526
- errno == ETIMEDOUT ||
2527
- errno == ENETUNREACH ||
2528
- errno == EHOSTUNREACH ||
2529
- errno == ECONNRESET ||
2530
- errno == ESHUTDOWN ||
2531
- errno == ECONNABORTED;
2532
- #endif
2533
- }
2534
-
2535
- bool
2536
- IceInternal::connectionRefused()
2537
- {
2538
- #if defined(_WIN32)
2539
- int error = WSAGetLastError();
2540
- return error == WSAECONNREFUSED || error == ERROR_CONNECTION_REFUSED;
2541
- #else
2542
- return errno == ECONNREFUSED;
2543
- #endif
2544
- }
2545
-
2546
- bool
2547
- IceInternal::connectionLost()
2548
- {
2549
- #ifdef _WIN32
2550
- int error = WSAGetLastError();
2551
- return error == WSAECONNRESET ||
2552
- error == WSAESHUTDOWN ||
2553
- error == WSAENOTCONN ||
2554
- # ifdef ICE_USE_IOCP
2555
- error == ERROR_NETNAME_DELETED ||
2556
- # endif
2557
- error == WSAECONNABORTED;
2558
- #else
2559
- return errno == ECONNRESET ||
2560
- errno == ENOTCONN ||
2561
- errno == ESHUTDOWN ||
2562
- errno == ECONNABORTED ||
2563
- errno == EPIPE;
2564
- #endif
2565
- }
2566
-
2567
- bool
2568
- IceInternal::connectInProgress()
2569
- {
2570
- #ifdef _WIN32
2571
- int error = WSAGetLastError();
2572
- return error == WSAEWOULDBLOCK || error == WSA_IO_PENDING || error == ERROR_IO_PENDING;
2573
- #else
2574
- return errno == EINPROGRESS;
2575
- #endif
2576
- }
2577
-
2578
- bool
2579
- IceInternal::notConnected()
2580
- {
2581
- #ifdef _WIN32
2582
- return WSAGetLastError() == WSAENOTCONN;
2583
- #elif defined(__APPLE__) || defined(__FreeBSD__)
2584
- return errno == ENOTCONN || errno == EINVAL;
2585
- #else
2586
- return errno == ENOTCONN;
2587
- #endif
2588
- }
2589
-
2590
- bool
2591
- IceInternal::recvTruncated()
2592
- {
2593
- #ifdef _WIN32
2594
- int err = WSAGetLastError();
2595
- return err == WSAEMSGSIZE || err == ERROR_MORE_DATA;
2596
- #else
2597
- // We don't get an error under Linux if a datagram is truncated.
2598
- return false;
2599
- #endif
2600
- }
2601
-
2602
- void
2603
- IceInternal::doListen(SOCKET fd, int backlog)
2604
- {
2605
- repeatListen:
2606
- if(::listen(fd, backlog) == SOCKET_ERROR)
2607
- {
2608
- if(interrupted())
2609
- {
2610
- goto repeatListen;
2611
- }
2612
-
2613
- closeSocketNoThrow(fd);
2614
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2615
- }
2616
- }
2617
-
2618
- bool
2619
- IceInternal::doConnect(SOCKET fd, const Address& addr, const Address& sourceAddr)
2620
- {
2621
- if(isAddressValid(sourceAddr))
2622
- {
2623
- doBind(fd, sourceAddr);
2624
- }
2625
-
2626
- repeatConnect:
2627
- int size = getAddressStorageSize(addr);
2628
- assert(size != 0);
2629
-
2630
- if(::connect(fd, &addr.sa, static_cast<socklen_t>(size)) == SOCKET_ERROR)
2631
- {
2632
- if(interrupted())
2633
- {
2634
- goto repeatConnect;
2635
- }
2636
-
2637
- if(connectInProgress())
2638
- {
2639
- return false;
2640
- }
2641
-
2642
- closeSocketNoThrow(fd);
2643
- if(connectionRefused())
2644
- {
2645
- throw ConnectionRefusedException(__FILE__, __LINE__, getSocketErrno());
2646
- }
2647
- else if(connectFailed())
2648
- {
2649
- throw ConnectFailedException(__FILE__, __LINE__, getSocketErrno());
2650
- }
2651
- else
2652
- {
2653
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2654
- }
2655
- }
2656
-
2657
- #if defined(__linux__)
2658
- //
2659
- // Prevent self connect (self connect happens on Linux when a client tries to connect to
2660
- // a server which was just deactivated if the client socket re-uses the same ephemeral
2661
- // port as the server).
2662
- //
2663
- Address localAddr;
2664
- try
2665
- {
2666
- fdToLocalAddress(fd, localAddr);
2667
- if(compareAddress(addr, localAddr) == 0)
2668
- {
2669
- throw ConnectionRefusedException(__FILE__, __LINE__, 0); // No appropriate errno
2670
- }
2671
- }
2672
- catch(const LocalException&)
2673
- {
2674
- closeSocketNoThrow(fd);
2675
- throw;
2676
- }
2677
- #endif
2678
- return true;
2679
- }
2680
-
2681
- void
2682
- IceInternal::doFinishConnect(SOCKET fd)
2683
- {
2684
- //
2685
- // Note: we don't close the socket if there's an exception. It's the responsability
2686
- // of the caller to do so.
2687
- //
2688
-
2689
- //
2690
- // Strange windows bug: The following call to Sleep() is
2691
- // necessary, otherwise no error is reported through
2692
- // getsockopt.
2693
- //
2694
- #if defined(_WIN32)
2695
- Sleep(0);
2696
- #endif
2697
-
2698
- int val;
2699
- socklen_t len = static_cast<socklen_t>(sizeof(int));
2700
- if(getsockopt(fd, SOL_SOCKET, SO_ERROR, reinterpret_cast<char*>(&val), &len) == SOCKET_ERROR)
2701
- {
2702
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2703
- }
2704
-
2705
- if(val > 0)
2706
- {
2707
- #if defined(_WIN32)
2708
- WSASetLastError(val);
2709
- #else
2710
- errno = val;
2711
- #endif
2712
- if(connectionRefused())
2713
- {
2714
- throw ConnectionRefusedException(__FILE__, __LINE__, getSocketErrno());
2715
- }
2716
- else if(connectFailed())
2717
- {
2718
- throw ConnectFailedException(__FILE__, __LINE__, getSocketErrno());
2719
- }
2720
- else
2721
- {
2722
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2723
- }
2724
- }
2725
-
2726
- #if defined(__linux__)
2727
- //
2728
- // Prevent self connect (self connect happens on Linux when a client tries to connect to
2729
- // a server which was just deactivated if the client socket re-uses the same ephemeral
2730
- // port as the server).
2731
- //
2732
- Address localAddr;
2733
- fdToLocalAddress(fd, localAddr);
2734
- Address remoteAddr;
2735
- if(fdToRemoteAddress(fd, remoteAddr) && compareAddress(remoteAddr, localAddr) == 0)
2736
- {
2737
- throw ConnectionRefusedException(__FILE__, __LINE__, 0); // No appropriate errno
2738
- }
2739
- #endif
2740
- }
2741
-
2742
- SOCKET
2743
- IceInternal::doAccept(SOCKET fd)
2744
- {
2745
- #ifdef _WIN32
2746
- SOCKET ret;
2747
- #else
2748
- int ret;
2749
- #endif
2750
-
2751
- repeatAccept:
2752
- if((ret = ::accept(fd, 0, 0)) == INVALID_SOCKET)
2753
- {
2754
- if(acceptInterrupted())
2755
- {
2756
- goto repeatAccept;
2757
- }
2758
-
2759
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2760
- }
2761
-
2762
- setTcpNoDelay(ret);
2763
- setKeepAlive(ret);
2764
- return ret;
2765
- }
2766
-
2767
- void
2768
- IceInternal::createPipe(SOCKET fds[2])
2769
- {
2770
- #ifdef _WIN32
2771
-
2772
- SOCKET fd = createSocketImpl(false, AF_INET);
2773
- setBlock(fd, true);
2774
-
2775
- Address addr;
2776
- memset(&addr.saStorage, 0, sizeof(sockaddr_storage));
2777
-
2778
- addr.saIn.sin_family = AF_INET;
2779
- addr.saIn.sin_port = htons(0);
2780
- addr.saIn.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
2781
-
2782
- addr = doBind(fd, addr);
2783
- doListen(fd, 1);
2784
-
2785
- try
2786
- {
2787
- fds[0] = createSocketImpl(false, AF_INET);
2788
- }
2789
- catch(...)
2790
- {
2791
- ::closesocket(fd);
2792
- throw;
2793
- }
2794
-
2795
- try
2796
- {
2797
- setBlock(fds[0], true);
2798
- # ifndef NDEBUG
2799
- bool connected = doConnect(fds[0], addr, Address());
2800
- assert(connected);
2801
- # else
2802
- doConnect(fds[0], addr, Address());
2803
- # endif
2804
- }
2805
- catch(...)
2806
- {
2807
- // fds[0] is closed by doConnect
2808
- ::closesocket(fd);
2809
- throw;
2810
- }
2811
-
2812
- try
2813
- {
2814
- fds[1] = doAccept(fd);
2815
- }
2816
- catch(...)
2817
- {
2818
- ::closesocket(fds[0]);
2819
- ::closesocket(fd);
2820
- throw;
2821
- }
2822
-
2823
- ::closesocket(fd);
2824
-
2825
- try
2826
- {
2827
- setBlock(fds[1], true);
2828
- }
2829
- catch(...)
2830
- {
2831
- ::closesocket(fds[0]);
2832
- // fds[1] is closed by setBlock
2833
- throw;
2834
- }
2835
-
2836
- #else
2837
-
2838
- if(::pipe(fds) != 0)
2839
- {
2840
- throw SyscallException(__FILE__, __LINE__, getSocketErrno());
2841
- }
2842
-
2843
- try
2844
- {
2845
- setBlock(fds[0], true);
2846
- }
2847
- catch(...)
2848
- {
2849
- // fds[0] is closed by setBlock
2850
- closeSocketNoThrow(fds[1]);
2851
- throw;
2852
- }
2853
-
2854
- try
2855
- {
2856
- setBlock(fds[1], true);
2857
- }
2858
- catch(...)
2859
- {
2860
- closeSocketNoThrow(fds[0]);
2861
- // fds[1] is closed by setBlock
2862
- throw;
2863
- }
2864
-
2865
- #endif
2866
- }
2867
-
2868
- #else // ICE_OS_UWP
2869
-
2870
- void
2871
- IceInternal::checkConnectErrorCode(const char* file, int line, HRESULT herr)
2872
- {
2873
- if(herr == E_ACCESSDENIED)
2874
- {
2875
- throw SocketException(file, line, static_cast<int>(herr));
2876
- }
2877
- SocketErrorStatus error = SocketError::GetStatus(herr);
2878
- if(error == SocketErrorStatus::ConnectionRefused)
2879
- {
2880
- throw ConnectionRefusedException(file, line, static_cast<int>(error));
2881
- }
2882
- else if(error == SocketErrorStatus::NetworkDroppedConnectionOnReset ||
2883
- error == SocketErrorStatus::ConnectionTimedOut ||
2884
- error == SocketErrorStatus::NetworkIsUnreachable ||
2885
- error == SocketErrorStatus::UnreachableHost ||
2886
- error == SocketErrorStatus::ConnectionResetByPeer ||
2887
- error == SocketErrorStatus::SoftwareCausedConnectionAbort)
2888
- {
2889
- throw ConnectFailedException(file, line, static_cast<int>(error));
2890
- }
2891
- else if(error == SocketErrorStatus::HostNotFound)
2892
- {
2893
- throw DNSException(file, line, static_cast<int>(error), "");
2894
- }
2895
- else
2896
- {
2897
- throw SocketException(file, line, static_cast<int>(error));
2898
- }
2899
- }
2900
-
2901
- void
2902
- IceInternal::checkErrorCode(const char* file, int line, HRESULT herr)
2903
- {
2904
- if(herr == E_ACCESSDENIED)
2905
- {
2906
- throw SocketException(file, line, static_cast<int>(herr));
2907
- }
2908
- SocketErrorStatus error = SocketError::GetStatus(herr);
2909
- if(error == SocketErrorStatus::NetworkDroppedConnectionOnReset ||
2910
- error == SocketErrorStatus::SoftwareCausedConnectionAbort ||
2911
- error == SocketErrorStatus::ConnectionResetByPeer)
2912
- {
2913
- throw ConnectionLostException(file, line, static_cast<int>(error));
2914
- }
2915
- else if(error == SocketErrorStatus::HostNotFound)
2916
- {
2917
- throw DNSException(file, line, static_cast<int>(error), "");
2918
- }
2919
- else
2920
- {
2921
- throw SocketException(file, line, static_cast<int>(error));
2922
- }
2923
- }
2924
-
2925
- //
2926
- // UWP impose some restriction on operations that block when run from
2927
- // STA thread and throws concurrency::invalid_operation. We cannot
2928
- // directly call task::get or task::way, this helper method is used to
2929
- // workaround this limitation.
2930
- //
2931
- void
2932
- IceInternal::runSync(Windows::Foundation::IAsyncAction^ action)
2933
- {
2934
- std::promise<void> p;
2935
-
2936
- concurrency::create_task(action).then(
2937
- [&p](concurrency::task<void> t)
2938
- {
2939
- try
2940
- {
2941
- t.get();
2942
- p.set_value();
2943
- }
2944
- catch(...)
2945
- {
2946
- p.set_exception(std::current_exception());
2947
- }
2948
- },
2949
- concurrency::task_continuation_context::use_arbitrary());
2950
-
2951
- return p.get_future().get();
2952
- }
2953
-
2954
- #endif
2955
-
2956
- #if defined(ICE_USE_IOCP)
2957
- void
2958
- IceInternal::doConnectAsync(SOCKET fd, const Address& addr, const Address& sourceAddr, AsyncInfo& info)
2959
- {
2960
- //
2961
- // NOTE: It's the caller's responsability to close the socket upon
2962
- // failure to connect. The socket isn't closed by this method.
2963
- //
2964
- Address bindAddr;
2965
- if(isAddressValid(sourceAddr))
2966
- {
2967
- bindAddr = sourceAddr;
2968
- }
2969
- else
2970
- {
2971
- memset(&bindAddr.saStorage, 0, sizeof(sockaddr_storage));
2972
- if(addr.saStorage.ss_family == AF_INET)
2973
- {
2974
- bindAddr.saIn.sin_family = AF_INET;
2975
- bindAddr.saIn.sin_port = htons(0);
2976
- bindAddr.saIn.sin_addr.s_addr = htonl(INADDR_ANY);
2977
- }
2978
- else if(addr.saStorage.ss_family == AF_INET6)
2979
- {
2980
- bindAddr.saIn6.sin6_family = AF_INET6;
2981
- bindAddr.saIn6.sin6_port = htons(0);
2982
- bindAddr.saIn6.sin6_addr = in6addr_any;
2983
- }
2984
- }
2985
-
2986
- int size = getAddressStorageSize(bindAddr);
2987
- assert(size != 0);
2988
-
2989
- if(::bind(fd, &bindAddr.sa, size) == SOCKET_ERROR)
2990
- {
2991
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
2992
- }
2993
-
2994
- LPFN_CONNECTEX ConnectEx = ICE_NULLPTR; // a pointer to the 'ConnectEx()' function
2995
- GUID GuidConnectEx = WSAID_CONNECTEX; // The Guid
2996
- DWORD dwBytes;
2997
- if(WSAIoctl(fd,
2998
- SIO_GET_EXTENSION_FUNCTION_POINTER,
2999
- &GuidConnectEx,
3000
- sizeof(GuidConnectEx),
3001
- &ConnectEx,
3002
- sizeof(ConnectEx),
3003
- &dwBytes,
3004
- ICE_NULLPTR,
3005
- ICE_NULLPTR) == SOCKET_ERROR)
3006
- {
3007
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
3008
- }
3009
-
3010
- if(!ConnectEx(fd, &addr.sa, size, 0, 0, 0, &info))
3011
- {
3012
- if(!connectInProgress())
3013
- {
3014
- if(connectionRefused())
3015
- {
3016
- throw ConnectionRefusedException(__FILE__, __LINE__, getSocketErrno());
3017
- }
3018
- else if(connectFailed())
3019
- {
3020
- throw ConnectFailedException(__FILE__, __LINE__, getSocketErrno());
3021
- }
3022
- else
3023
- {
3024
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
3025
- }
3026
- }
3027
- }
3028
- }
3029
-
3030
- void
3031
- IceInternal::doFinishConnectAsync(SOCKET fd, AsyncInfo& info)
3032
- {
3033
- //
3034
- // NOTE: It's the caller's responsability to close the socket upon
3035
- // failure to connect. The socket isn't closed by this method.
3036
- //
3037
-
3038
- if(info.error != ERROR_SUCCESS)
3039
- {
3040
- WSASetLastError(info.error);
3041
- if(connectionRefused())
3042
- {
3043
- throw ConnectionRefusedException(__FILE__, __LINE__, getSocketErrno());
3044
- }
3045
- else if(connectFailed())
3046
- {
3047
- throw ConnectFailedException(__FILE__, __LINE__, getSocketErrno());
3048
- }
3049
- else
3050
- {
3051
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
3052
- }
3053
- }
3054
-
3055
- if(setsockopt(fd, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, ICE_NULLPTR, 0) == SOCKET_ERROR)
3056
- {
3057
- throw SocketException(__FILE__, __LINE__, getSocketErrno());
3058
- }
3059
- }
3060
- #endif
3061
-
3062
- bool
3063
- IceInternal::isIpAddress(const string& name)
3064
- {
3065
- #ifdef ICE_OS_UWP
3066
- HostName^ hostname = ref new HostName(ref new String(stringToWstring(name,
3067
- getProcessStringConverter()).c_str()));
3068
- return hostname->Type == HostNameType::Ipv4 || hostname->Type == HostNameType::Ipv6;
3069
- #else
3070
- in_addr addr;
3071
- in6_addr addr6;
3072
-
3073
- return inet_pton(AF_INET, name.c_str(), &addr) > 0 || inet_pton(AF_INET6, name.c_str(), &addr6) > 0;
3074
- #endif
3075
- }