zeroc-ice 3.7.9.1 → 3.8.0

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 (1215) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Communicator.cpp +575 -0
  3. data/dist/IceRuby/Communicator.h +19 -0
  4. data/dist/IceRuby/Config.h +77 -0
  5. data/dist/IceRuby/Connection.cpp +428 -0
  6. data/dist/IceRuby/Connection.h +20 -0
  7. data/dist/IceRuby/DefaultSliceLoader.cpp +45 -0
  8. data/dist/IceRuby/DefaultSliceLoader.h +25 -0
  9. data/dist/IceRuby/Endpoint.cpp +342 -0
  10. data/dist/IceRuby/Endpoint.h +18 -0
  11. data/dist/IceRuby/ImplicitContext.cpp +143 -0
  12. data/dist/IceRuby/ImplicitContext.h +16 -0
  13. data/dist/IceRuby/Init.cpp +36 -0
  14. data/dist/IceRuby/Logger.cpp +146 -0
  15. data/dist/IceRuby/Logger.h +19 -0
  16. data/dist/IceRuby/Operation.cpp +623 -0
  17. data/dist/IceRuby/Operation.h +28 -0
  18. data/dist/IceRuby/Properties.cpp +413 -0
  19. data/dist/IceRuby/Properties.h +16 -0
  20. data/dist/IceRuby/Proxy.cpp +926 -0
  21. data/dist/IceRuby/Proxy.h +21 -0
  22. data/dist/IceRuby/RubySliceLoader.cpp +39 -0
  23. data/dist/IceRuby/RubySliceLoader.h +27 -0
  24. data/dist/IceRuby/Slice.cpp +199 -0
  25. data/dist/IceRuby/Slice.h +13 -0
  26. data/dist/IceRuby/Types.cpp +3133 -0
  27. data/dist/IceRuby/Types.h +533 -0
  28. data/dist/IceRuby/Util.cpp +553 -0
  29. data/dist/IceRuby/Util.h +485 -0
  30. data/dist/ice/cpp/include/Ice/AsyncResponseHandler.h +85 -0
  31. data/dist/ice/cpp/include/Ice/BatchRequest.h +39 -0
  32. data/dist/ice/cpp/include/Ice/BatchRequestQueueF.h +14 -0
  33. data/dist/ice/cpp/include/Ice/Buffer.h +159 -0
  34. data/dist/ice/cpp/include/Ice/Communicator.h +411 -0
  35. data/dist/ice/cpp/include/Ice/CommunicatorF.h +16 -0
  36. data/dist/ice/cpp/include/Ice/Config.h +60 -0
  37. data/dist/ice/cpp/include/Ice/Connection.h +410 -0
  38. data/dist/ice/cpp/include/Ice/ConnectionF.h +36 -0
  39. data/dist/ice/cpp/include/Ice/ConnectionIF.h +16 -0
  40. data/dist/ice/cpp/include/Ice/CtrlCHandler.h +56 -0
  41. data/dist/ice/cpp/include/Ice/Current.h +60 -0
  42. data/dist/ice/cpp/include/Ice/DefaultSliceLoader.h +160 -0
  43. data/dist/ice/cpp/include/Ice/Demangle.h +17 -0
  44. data/dist/ice/cpp/include/Ice/Endpoint.h +298 -0
  45. data/dist/ice/cpp/include/Ice/EndpointF.h +44 -0
  46. data/dist/ice/cpp/include/Ice/EndpointSelectionType.h +21 -0
  47. data/dist/ice/cpp/include/Ice/Exception.h +56 -0
  48. data/dist/ice/cpp/include/Ice/FacetMap.h +16 -0
  49. data/dist/ice/cpp/include/Ice/Format.h +22 -0
  50. data/dist/ice/cpp/include/Ice/Ice.h +60 -0
  51. data/dist/ice/cpp/include/Ice/IconvStringConverter.h +216 -0
  52. data/dist/ice/cpp/include/Ice/ImplicitContext.h +76 -0
  53. data/dist/ice/cpp/include/Ice/IncomingRequest.h +75 -0
  54. data/dist/ice/cpp/include/Ice/Initialize.h +143 -0
  55. data/dist/ice/cpp/include/Ice/InputStream.h +942 -0
  56. data/dist/ice/cpp/include/Ice/InstanceF.h +14 -0
  57. data/dist/ice/cpp/include/Ice/Instrumentation.h +319 -0
  58. data/dist/ice/cpp/include/Ice/LocalException.h +58 -0
  59. data/dist/ice/cpp/include/Ice/LocalExceptions.h +870 -0
  60. data/dist/ice/cpp/include/Ice/Logger.h +62 -0
  61. data/dist/ice/cpp/include/Ice/LoggerUtil.h +162 -0
  62. data/dist/ice/cpp/include/Ice/MarshaledResult.h +50 -0
  63. data/dist/ice/cpp/include/Ice/NativePropertiesAdmin.h +54 -0
  64. data/dist/ice/cpp/include/Ice/Object.h +168 -0
  65. data/dist/ice/cpp/include/Ice/ObjectAdapter.h +324 -0
  66. data/dist/ice/cpp/include/Ice/ObjectAdapterF.h +16 -0
  67. data/dist/ice/cpp/include/Ice/ObjectF.h +16 -0
  68. data/dist/ice/cpp/include/Ice/ObserverHelper.h +164 -0
  69. data/dist/ice/cpp/include/Ice/OutgoingAsync.h +512 -0
  70. data/dist/ice/cpp/include/Ice/OutgoingResponse.h +129 -0
  71. data/dist/ice/cpp/include/Ice/OutputStream.h +872 -0
  72. data/dist/ice/cpp/include/Ice/Plugin.h +73 -0
  73. data/dist/ice/cpp/include/Ice/PluginFactory.h +77 -0
  74. data/dist/ice/cpp/include/Ice/PopDisableWarnings.h +16 -0
  75. data/dist/ice/cpp/include/Ice/Properties.h +307 -0
  76. data/dist/ice/cpp/include/Ice/PropertiesF.h +19 -0
  77. data/dist/ice/cpp/include/Ice/Proxy.h +742 -0
  78. data/dist/ice/cpp/include/Ice/ProxyF.h +11 -0
  79. data/dist/ice/cpp/include/Ice/ProxyFunctions.h +209 -0
  80. data/dist/ice/cpp/include/Ice/PushDisableWarnings.h +29 -0
  81. data/dist/ice/cpp/include/Ice/ReferenceF.h +14 -0
  82. data/dist/ice/cpp/include/Ice/RequestHandlerF.h +20 -0
  83. data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +268 -0
  84. data/dist/ice/cpp/include/Ice/SSL/Config.h +54 -0
  85. data/dist/ice/cpp/include/Ice/SSL/ConnectionInfo.h +107 -0
  86. data/dist/ice/cpp/include/Ice/SSL/ConnectionInfoF.h +39 -0
  87. data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +40 -0
  88. data/dist/ice/cpp/include/Ice/SSL/SSLException.h +32 -0
  89. data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +278 -0
  90. data/dist/ice/cpp/include/Ice/ServantLocator.h +51 -0
  91. data/dist/ice/cpp/include/Ice/Service.h +219 -0
  92. data/dist/ice/cpp/include/Ice/SliceLoader.h +67 -0
  93. data/dist/ice/cpp/include/Ice/SlicedData.h +125 -0
  94. data/dist/ice/cpp/include/Ice/SlicedDataF.h +30 -0
  95. data/dist/ice/cpp/include/Ice/StreamHelpers.h +652 -0
  96. data/dist/ice/cpp/include/Ice/StreamableTraits.h +291 -0
  97. data/dist/ice/cpp/include/Ice/StringConverter.h +167 -0
  98. data/dist/ice/cpp/include/Ice/StringUtil.h +114 -0
  99. data/dist/ice/cpp/include/Ice/TimerTask.h +24 -0
  100. data/dist/ice/cpp/include/Ice/TupleCompare.h +103 -0
  101. data/dist/ice/cpp/include/Ice/UUID.h +16 -0
  102. data/dist/ice/cpp/include/Ice/UserException.h +46 -0
  103. data/dist/ice/cpp/include/Ice/UserExceptionFactory.h +15 -0
  104. data/dist/ice/cpp/include/Ice/Value.h +127 -0
  105. data/dist/ice/cpp/include/Ice/ValueF.h +16 -0
  106. data/dist/ice/cpp/include/IceDiscovery/IceDiscovery.h +28 -0
  107. data/dist/ice/cpp/include/IceLocatorDiscovery/IceLocatorDiscovery.h +28 -0
  108. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +70 -0
  109. data/dist/ice/cpp/include/generated/Ice/Context.h +40 -0
  110. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +74 -0
  111. data/dist/ice/cpp/include/generated/Ice/Identity.h +108 -0
  112. data/dist/ice/cpp/include/generated/Ice/Locator.h +542 -0
  113. data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +443 -0
  114. data/dist/ice/cpp/include/generated/Ice/Metrics.h +1103 -0
  115. data/dist/ice/cpp/include/generated/Ice/OperationMode.h +73 -0
  116. data/dist/ice/cpp/include/generated/Ice/Process.h +245 -0
  117. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +314 -0
  118. data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +39 -0
  119. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +724 -0
  120. data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +94 -0
  121. data/dist/ice/cpp/include/generated/Ice/Router.h +496 -0
  122. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +37 -0
  123. data/dist/ice/cpp/include/generated/Ice/Version.h +112 -0
  124. data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +498 -0
  125. data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +387 -0
  126. data/dist/ice/cpp/src/Ice/Acceptor.h +41 -0
  127. data/dist/ice/cpp/src/Ice/AcceptorF.h +17 -0
  128. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories.h +16 -0
  129. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +43 -0
  130. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_min.cpp +17 -0
  131. data/dist/ice/cpp/src/Ice/ArgVector.cpp +58 -0
  132. data/dist/ice/cpp/src/Ice/ArgVector.h +30 -0
  133. data/dist/ice/cpp/src/Ice/Base64.cpp +263 -0
  134. data/dist/ice/cpp/src/Ice/Base64.h +26 -0
  135. data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +199 -0
  136. data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +49 -0
  137. data/dist/ice/cpp/src/Ice/Buffer.cpp +187 -0
  138. data/dist/ice/cpp/src/Ice/CheckIdentity.h +21 -0
  139. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +373 -0
  140. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +65 -0
  141. data/dist/ice/cpp/src/Ice/Communicator.cpp +399 -0
  142. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +140 -0
  143. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.h +39 -0
  144. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +227 -0
  145. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +51 -0
  146. data/dist/ice/cpp/src/Ice/ConnectRequestHandlerF.h +14 -0
  147. data/dist/ice/cpp/src/Ice/Connection.cpp +44 -0
  148. data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +1758 -0
  149. data/dist/ice/cpp/src/Ice/ConnectionFactory.h +264 -0
  150. data/dist/ice/cpp/src/Ice/ConnectionFactoryF.h +17 -0
  151. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +3563 -0
  152. data/dist/ice/cpp/src/Ice/ConnectionI.h +429 -0
  153. data/dist/ice/cpp/src/Ice/ConnectionOptions.h +22 -0
  154. data/dist/ice/cpp/src/Ice/Connector.h +38 -0
  155. data/dist/ice/cpp/src/Ice/ConnectorF.h +14 -0
  156. data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +136 -0
  157. data/dist/ice/cpp/src/Ice/ConsoleUtil.h +79 -0
  158. data/dist/ice/cpp/src/Ice/CtrlCHandler.cpp +189 -0
  159. data/dist/ice/cpp/src/Ice/Current.cpp +29 -0
  160. data/dist/ice/cpp/src/Ice/DLLMain.cpp +40 -0
  161. data/dist/ice/cpp/src/Ice/DefaultSliceLoader.cpp +39 -0
  162. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +81 -0
  163. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.h +38 -0
  164. data/dist/ice/cpp/src/Ice/DefaultsAndOverridesF.h +14 -0
  165. data/dist/ice/cpp/src/Ice/Demangle.cpp +25 -0
  166. data/dist/ice/cpp/src/Ice/DisableWarnings.h +31 -0
  167. data/dist/ice/cpp/src/Ice/DynamicLibrary.cpp +216 -0
  168. data/dist/ice/cpp/src/Ice/DynamicLibrary.h +91 -0
  169. data/dist/ice/cpp/src/Ice/Endian.h +40 -0
  170. data/dist/ice/cpp/src/Ice/EndpointFactory.cpp +165 -0
  171. data/dist/ice/cpp/src/Ice/EndpointFactory.h +96 -0
  172. data/dist/ice/cpp/src/Ice/EndpointFactoryF.h +14 -0
  173. data/dist/ice/cpp/src/Ice/EndpointFactoryManager.cpp +180 -0
  174. data/dist/ice/cpp/src/Ice/EndpointFactoryManager.h +42 -0
  175. data/dist/ice/cpp/src/Ice/EndpointFactoryManagerF.h +14 -0
  176. data/dist/ice/cpp/src/Ice/EndpointI.cpp +128 -0
  177. data/dist/ice/cpp/src/Ice/EndpointI.h +150 -0
  178. data/dist/ice/cpp/src/Ice/EndpointIF.h +21 -0
  179. data/dist/ice/cpp/src/Ice/EventHandler.cpp +9 -0
  180. data/dist/ice/cpp/src/Ice/EventHandler.h +71 -0
  181. data/dist/ice/cpp/src/Ice/EventHandlerF.h +14 -0
  182. data/dist/ice/cpp/src/Ice/Exception.cpp +5 -0
  183. data/dist/ice/cpp/src/Ice/FileUtil.cpp +476 -0
  184. data/dist/ice/cpp/src/Ice/FileUtil.h +152 -0
  185. data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +34 -0
  186. data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +29 -0
  187. data/dist/ice/cpp/src/Ice/HashUtil.h +67 -0
  188. data/dist/ice/cpp/src/Ice/HttpParser.cpp +684 -0
  189. data/dist/ice/cpp/src/Ice/HttpParser.h +112 -0
  190. data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +593 -0
  191. data/dist/ice/cpp/src/Ice/IPEndpointI.h +106 -0
  192. data/dist/ice/cpp/src/Ice/IPEndpointIF.h +17 -0
  193. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +172 -0
  194. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.h +89 -0
  195. data/dist/ice/cpp/src/Ice/ImplicitContext.cpp +109 -0
  196. data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +66 -0
  197. data/dist/ice/cpp/src/Ice/Initialize.cpp +160 -0
  198. data/dist/ice/cpp/src/Ice/InputStream.cpp +2206 -0
  199. data/dist/ice/cpp/src/Ice/Instance.cpp +1956 -0
  200. data/dist/ice/cpp/src/Ice/Instance.h +225 -0
  201. data/dist/ice/cpp/src/Ice/InstrumentationI.cpp +959 -0
  202. data/dist/ice/cpp/src/Ice/InstrumentationI.h +235 -0
  203. data/dist/ice/cpp/src/Ice/LocalException.cpp +518 -0
  204. data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +577 -0
  205. data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +851 -0
  206. data/dist/ice/cpp/src/Ice/LocatorInfo.h +176 -0
  207. data/dist/ice/cpp/src/Ice/LocatorInfoF.h +20 -0
  208. data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +774 -0
  209. data/dist/ice/cpp/src/Ice/LoggerAdminI.h +31 -0
  210. data/dist/ice/cpp/src/Ice/LoggerI.cpp +234 -0
  211. data/dist/ice/cpp/src/Ice/LoggerI.h +47 -0
  212. data/dist/ice/cpp/src/Ice/LoggerMiddleware.cpp +176 -0
  213. data/dist/ice/cpp/src/Ice/LoggerMiddleware.h +42 -0
  214. data/dist/ice/cpp/src/Ice/LoggerUtil.cpp +76 -0
  215. data/dist/ice/cpp/src/Ice/MarshaledResult.cpp +20 -0
  216. data/dist/ice/cpp/src/Ice/MetricsAdminI.cpp +608 -0
  217. data/dist/ice/cpp/src/Ice/MetricsAdminI.h +600 -0
  218. data/dist/ice/cpp/src/Ice/MetricsFunctional.h +92 -0
  219. data/dist/ice/cpp/src/Ice/MetricsObserverI.h +587 -0
  220. data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +185 -0
  221. data/dist/ice/cpp/src/Ice/Network.cpp +1927 -0
  222. data/dist/ice/cpp/src/Ice/Network.h +265 -0
  223. data/dist/ice/cpp/src/Ice/NetworkF.h +11 -0
  224. data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +306 -0
  225. data/dist/ice/cpp/src/Ice/NetworkProxy.h +67 -0
  226. data/dist/ice/cpp/src/Ice/NetworkProxyF.h +14 -0
  227. data/dist/ice/cpp/src/Ice/OSLogLoggerI.cpp +55 -0
  228. data/dist/ice/cpp/src/Ice/OSLogLoggerI.h +35 -0
  229. data/dist/ice/cpp/src/Ice/Object.cpp +249 -0
  230. data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +348 -0
  231. data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.h +53 -0
  232. data/dist/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +14 -0
  233. data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +1383 -0
  234. data/dist/ice/cpp/src/Ice/ObjectAdapterI.h +163 -0
  235. data/dist/ice/cpp/src/Ice/ObserverHelper.cpp +75 -0
  236. data/dist/ice/cpp/src/Ice/ObserverMiddleware.cpp +96 -0
  237. data/dist/ice/cpp/src/Ice/ObserverMiddleware.h +25 -0
  238. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +368 -0
  239. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.h +66 -0
  240. data/dist/ice/cpp/src/Ice/Options.cpp +980 -0
  241. data/dist/ice/cpp/src/Ice/Options.h +119 -0
  242. data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1106 -0
  243. data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +276 -0
  244. data/dist/ice/cpp/src/Ice/OutputStream.cpp +1454 -0
  245. data/dist/ice/cpp/src/Ice/OutputUtil.cpp +344 -0
  246. data/dist/ice/cpp/src/Ice/OutputUtil.h +173 -0
  247. data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +344 -0
  248. data/dist/ice/cpp/src/Ice/PluginManagerI.h +54 -0
  249. data/dist/ice/cpp/src/Ice/Properties.cpp +931 -0
  250. data/dist/ice/cpp/src/Ice/PropertyNames.cpp +606 -0
  251. data/dist/ice/cpp/src/Ice/PropertyNames.h +63 -0
  252. data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +103 -0
  253. data/dist/ice/cpp/src/Ice/PropertyUtil.h +31 -0
  254. data/dist/ice/cpp/src/Ice/Protocol.cpp +159 -0
  255. data/dist/ice/cpp/src/Ice/Protocol.h +116 -0
  256. data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +186 -0
  257. data/dist/ice/cpp/src/Ice/ProtocolInstance.h +74 -0
  258. data/dist/ice/cpp/src/Ice/ProtocolInstanceF.h +14 -0
  259. data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +29 -0
  260. data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.h +35 -0
  261. data/dist/ice/cpp/src/Ice/Proxy.cpp +541 -0
  262. data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +684 -0
  263. data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +90 -0
  264. data/dist/ice/cpp/src/Ice/PushDisableDeprecatedWarnings.h +15 -0
  265. data/dist/ice/cpp/src/Ice/Random.cpp +29 -0
  266. data/dist/ice/cpp/src/Ice/Random.h +23 -0
  267. data/dist/ice/cpp/src/Ice/Reference.cpp +1584 -0
  268. data/dist/ice/cpp/src/Ice/Reference.h +339 -0
  269. data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +830 -0
  270. data/dist/ice/cpp/src/Ice/ReferenceFactory.h +58 -0
  271. data/dist/ice/cpp/src/Ice/ReferenceFactoryF.h +14 -0
  272. data/dist/ice/cpp/src/Ice/RequestHandler.cpp +28 -0
  273. data/dist/ice/cpp/src/Ice/RequestHandler.h +53 -0
  274. data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +76 -0
  275. data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +33 -0
  276. data/dist/ice/cpp/src/Ice/ResourceConfig.h +27 -0
  277. data/dist/ice/cpp/src/Ice/RetryQueue.cpp +151 -0
  278. data/dist/ice/cpp/src/Ice/RetryQueue.h +59 -0
  279. data/dist/ice/cpp/src/Ice/RetryQueueF.h +14 -0
  280. data/dist/ice/cpp/src/Ice/RouterInfo.cpp +275 -0
  281. data/dist/ice/cpp/src/Ice/RouterInfo.h +95 -0
  282. data/dist/ice/cpp/src/Ice/RouterInfoF.h +17 -0
  283. data/dist/ice/cpp/src/Ice/SHA1.cpp +195 -0
  284. data/dist/ice/cpp/src/Ice/SHA1.h +35 -0
  285. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +89 -0
  286. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +87 -0
  287. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +513 -0
  288. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +40 -0
  289. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngineF.h +13 -0
  290. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +635 -0
  291. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +80 -0
  292. data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +487 -0
  293. data/dist/ice/cpp/src/Ice/SSL/RFC2253.h +58 -0
  294. data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.cpp +124 -0
  295. data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.h +52 -0
  296. data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.cpp +92 -0
  297. data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.h +38 -0
  298. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +377 -0
  299. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.h +84 -0
  300. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.cpp +115 -0
  301. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +72 -0
  302. data/dist/ice/cpp/src/Ice/SSL/SSLEngineF.h +14 -0
  303. data/dist/ice/cpp/src/Ice/SSL/SSLException.cpp +18 -0
  304. data/dist/ice/cpp/src/Ice/SSL/SSLInstance.cpp +27 -0
  305. data/dist/ice/cpp/src/Ice/SSL/SSLInstance.h +26 -0
  306. data/dist/ice/cpp/src/Ice/SSL/SSLInstanceF.h +19 -0
  307. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +654 -0
  308. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.h +104 -0
  309. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +1437 -0
  310. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +58 -0
  311. data/dist/ice/cpp/src/Ice/SSL/SchannelEngineF.h +18 -0
  312. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +1085 -0
  313. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +118 -0
  314. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +822 -0
  315. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +44 -0
  316. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngineF.h +18 -0
  317. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +621 -0
  318. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.h +91 -0
  319. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +1061 -0
  320. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +40 -0
  321. data/dist/ice/cpp/src/Ice/SSL/TrustManager.cpp +222 -0
  322. data/dist/ice/cpp/src/Ice/SSL/TrustManager.h +42 -0
  323. data/dist/ice/cpp/src/Ice/SSL/TrustManagerF.h +14 -0
  324. data/dist/ice/cpp/src/Ice/ScannerConfig.h +35 -0
  325. data/dist/ice/cpp/src/Ice/Selector.cpp +1270 -0
  326. data/dist/ice/cpp/src/Ice/Selector.h +235 -0
  327. data/dist/ice/cpp/src/Ice/ServantManager.cpp +547 -0
  328. data/dist/ice/cpp/src/Ice/ServantManager.h +66 -0
  329. data/dist/ice/cpp/src/Ice/ServantManagerF.h +14 -0
  330. data/dist/ice/cpp/src/Ice/Service.cpp +1790 -0
  331. data/dist/ice/cpp/src/Ice/SharedContext.h +33 -0
  332. data/dist/ice/cpp/src/Ice/SliceLoader.cpp +53 -0
  333. data/dist/ice/cpp/src/Ice/SlicedData.cpp +48 -0
  334. data/dist/ice/cpp/src/Ice/StreamSocket.cpp +472 -0
  335. data/dist/ice/cpp/src/Ice/StreamSocket.h +73 -0
  336. data/dist/ice/cpp/src/Ice/StringConverter.cpp +582 -0
  337. data/dist/ice/cpp/src/Ice/StringUtil.cpp +1137 -0
  338. data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +160 -0
  339. data/dist/ice/cpp/src/Ice/SysLoggerI.h +34 -0
  340. data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +65 -0
  341. data/dist/ice/cpp/src/Ice/SystemdJournalI.h +33 -0
  342. data/dist/ice/cpp/src/Ice/TargetCompare.h +96 -0
  343. data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +213 -0
  344. data/dist/ice/cpp/src/Ice/TcpAcceptor.h +55 -0
  345. data/dist/ice/cpp/src/Ice/TcpConnector.cpp +128 -0
  346. data/dist/ice/cpp/src/Ice/TcpConnector.h +36 -0
  347. data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +411 -0
  348. data/dist/ice/cpp/src/Ice/TcpEndpointI.h +86 -0
  349. data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +147 -0
  350. data/dist/ice/cpp/src/Ice/TcpTransceiver.h +53 -0
  351. data/dist/ice/cpp/src/Ice/ThreadPool.cpp +1110 -0
  352. data/dist/ice/cpp/src/Ice/ThreadPool.h +305 -0
  353. data/dist/ice/cpp/src/Ice/ThreadPoolF.h +14 -0
  354. data/dist/ice/cpp/src/Ice/TimeUtil.cpp +47 -0
  355. data/dist/ice/cpp/src/Ice/TimeUtil.h +21 -0
  356. data/dist/ice/cpp/src/Ice/Timer.cpp +169 -0
  357. data/dist/ice/cpp/src/Ice/Timer.h +212 -0
  358. data/dist/ice/cpp/src/Ice/TraceLevels.cpp +20 -0
  359. data/dist/ice/cpp/src/Ice/TraceLevels.h +39 -0
  360. data/dist/ice/cpp/src/Ice/TraceLevelsF.h +14 -0
  361. data/dist/ice/cpp/src/Ice/TraceUtil.cpp +399 -0
  362. data/dist/ice/cpp/src/Ice/TraceUtil.h +41 -0
  363. data/dist/ice/cpp/src/Ice/Transceiver.cpp +14 -0
  364. data/dist/ice/cpp/src/Ice/Transceiver.h +52 -0
  365. data/dist/ice/cpp/src/Ice/TransceiverF.h +23 -0
  366. data/dist/ice/cpp/src/Ice/UUID.cpp +79 -0
  367. data/dist/ice/cpp/src/Ice/UdpConnector.cpp +131 -0
  368. data/dist/ice/cpp/src/Ice/UdpConnector.h +36 -0
  369. data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +480 -0
  370. data/dist/ice/cpp/src/Ice/UdpEndpointI.h +92 -0
  371. data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +786 -0
  372. data/dist/ice/cpp/src/Ice/UdpTransceiver.h +90 -0
  373. data/dist/ice/cpp/src/Ice/UndefSysMacros.h +37 -0
  374. data/dist/ice/cpp/src/Ice/UniqueRef.h +77 -0
  375. data/dist/ice/cpp/src/Ice/UserException.cpp +58 -0
  376. data/dist/ice/cpp/src/Ice/Value.cpp +145 -0
  377. data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +87 -0
  378. data/dist/ice/cpp/src/Ice/WSAcceptor.h +46 -0
  379. data/dist/ice/cpp/src/Ice/WSConnector.cpp +87 -0
  380. data/dist/ice/cpp/src/Ice/WSConnector.h +36 -0
  381. data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +455 -0
  382. data/dist/ice/cpp/src/Ice/WSEndpoint.h +82 -0
  383. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +1715 -0
  384. data/dist/ice/cpp/src/Ice/WSTransceiver.h +135 -0
  385. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +40 -0
  386. data/dist/ice/cpp/src/Ice/generated/Context.cpp +40 -0
  387. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +40 -0
  388. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +47 -0
  389. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +752 -0
  390. data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +577 -0
  391. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +1205 -0
  392. data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +56 -0
  393. data/dist/ice/cpp/src/Ice/generated/Process.cpp +330 -0
  394. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +443 -0
  395. data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +40 -0
  396. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +851 -0
  397. data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +70 -0
  398. data/dist/ice/cpp/src/Ice/generated/Router.cpp +660 -0
  399. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +39 -0
  400. data/dist/ice/cpp/src/Ice/generated/Version.cpp +54 -0
  401. data/dist/ice/cpp/src/IceDiscovery/LocatorI.cpp +202 -0
  402. data/dist/ice/cpp/src/IceDiscovery/LocatorI.h +68 -0
  403. data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +494 -0
  404. data/dist/ice/cpp/src/IceDiscovery/LookupI.h +168 -0
  405. data/dist/ice/cpp/src/IceDiscovery/PluginI.cpp +155 -0
  406. data/dist/ice/cpp/src/IceDiscovery/PluginI.h +31 -0
  407. data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +638 -0
  408. data/dist/ice/cpp/src/IceLocatorDiscovery/Plugin.h +24 -0
  409. data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +822 -0
  410. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +468 -0
  411. data/dist/ice/cpp/src/Slice/DeprecationReporter.cpp +172 -0
  412. data/dist/ice/cpp/src/Slice/DeprecationReporter.h +14 -0
  413. data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +736 -0
  414. data/dist/ice/cpp/src/Slice/DocCommentParser.h +61 -0
  415. data/dist/ice/cpp/src/Slice/FileTracker.cpp +96 -0
  416. data/dist/ice/cpp/src/Slice/FileTracker.h +44 -0
  417. data/dist/ice/cpp/src/Slice/Grammar.cpp +4125 -0
  418. data/dist/ice/cpp/src/Slice/Grammar.h +138 -0
  419. data/dist/ice/cpp/src/Slice/GrammarUtil.h +128 -0
  420. data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +473 -0
  421. data/dist/ice/cpp/src/Slice/MetadataValidation.h +106 -0
  422. data/dist/ice/cpp/src/Slice/Parser.cpp +4906 -0
  423. data/dist/ice/cpp/src/Slice/Parser.h +1175 -0
  424. data/dist/ice/cpp/src/Slice/Preprocessor.cpp +295 -0
  425. data/dist/ice/cpp/src/Slice/Preprocessor.h +44 -0
  426. data/dist/ice/cpp/src/Slice/Scanner.cpp +3445 -0
  427. data/dist/ice/cpp/src/Slice/SliceUtil.cpp +790 -0
  428. data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +448 -0
  429. data/dist/ice/cpp/src/Slice/Util.h +134 -0
  430. data/dist/ice/cpp/src/slice2rb/Main.cpp +33 -0
  431. data/dist/ice/cpp/src/slice2rb/Ruby.cpp +250 -0
  432. data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +1197 -0
  433. data/dist/ice/cpp/src/slice2rb/RubyUtil.h +56 -0
  434. data/dist/ice/mcpp/internal.H +530 -0
  435. data/dist/ice/slice/Glacier2/Metrics.ice +47 -0
  436. data/dist/ice/slice/Glacier2/PermissionsVerifier.ice +55 -0
  437. data/dist/ice/slice/Glacier2/Router.ice +93 -0
  438. data/dist/ice/slice/Glacier2/SSLInfo.ice +42 -0
  439. data/dist/ice/slice/Glacier2/Session.ice +133 -0
  440. data/dist/ice/slice/Ice/BuiltinSequences.ice +54 -0
  441. data/dist/ice/slice/Ice/Context.ice +24 -0
  442. data/dist/ice/slice/Ice/EndpointTypes.ice +50 -0
  443. data/dist/ice/slice/Ice/Identity.ice +36 -0
  444. data/dist/ice/slice/Ice/Locator.ice +74 -0
  445. data/dist/ice/slice/Ice/LocatorRegistry.ice +77 -0
  446. data/dist/ice/slice/Ice/Metrics.ice +201 -0
  447. data/dist/ice/slice/Ice/OperationMode.ice +38 -0
  448. data/dist/ice/slice/Ice/Process.ice +28 -0
  449. data/dist/ice/slice/Ice/PropertiesAdmin.ice +37 -0
  450. data/dist/ice/slice/Ice/PropertyDict.ice +23 -0
  451. data/dist/ice/slice/Ice/RemoteLogger.ice +126 -0
  452. data/dist/ice/slice/Ice/ReplyStatus.ice +65 -0
  453. data/dist/ice/slice/Ice/Router.ice +54 -0
  454. data/dist/ice/slice/Ice/SliceChecksumDict.ice +18 -0
  455. data/dist/ice/slice/Ice/Version.ice +43 -0
  456. data/dist/ice/slice/IceBox/ServiceManager.ice +79 -0
  457. data/dist/ice/slice/IceGrid/Admin.ice +981 -0
  458. data/dist/ice/slice/IceGrid/Descriptor.ice +519 -0
  459. data/dist/ice/slice/IceGrid/Exception.ice +98 -0
  460. data/dist/ice/slice/IceGrid/FileParser.ice +36 -0
  461. data/dist/ice/slice/IceGrid/Registry.ice +130 -0
  462. data/dist/ice/slice/IceGrid/Session.ice +64 -0
  463. data/dist/ice/slice/IceGrid/UserAccountMapper.ice +34 -0
  464. data/dist/ice/slice/IceStorm/IceStorm.ice +186 -0
  465. data/dist/ice/slice/IceStorm/Metrics.ice +41 -0
  466. data/dist/lib/Glacier2/Metrics.rb +41 -0
  467. data/dist/lib/Glacier2/PermissionsVerifier.rb +61 -0
  468. data/dist/lib/Glacier2/Router.rb +73 -0
  469. data/dist/lib/Glacier2/SSLInfo.rb +64 -0
  470. data/dist/lib/Glacier2/Session.rb +187 -0
  471. data/dist/lib/Glacier2.rb +7 -0
  472. data/dist/lib/Ice/BuiltinSequences.rb +48 -0
  473. data/dist/lib/Ice/CompressBatch.rb +50 -0
  474. data/dist/lib/Ice/Context.rb +12 -0
  475. data/dist/lib/Ice/EndpointSelectionType.rb +49 -0
  476. data/dist/lib/Ice/EndpointTypes.rb +28 -0
  477. data/dist/lib/Ice/Exception.rb +20 -0
  478. data/dist/lib/Ice/Identity.rb +47 -0
  479. data/dist/lib/Ice/IdentitySpaceship.rb +16 -0
  480. data/dist/lib/Ice/InitializationData.rb +12 -0
  481. data/dist/lib/Ice/LocalExceptions.rb +168 -0
  482. data/dist/lib/Ice/Locator.rb +83 -0
  483. data/dist/lib/Ice/LocatorRegistry.rb +73 -0
  484. data/dist/lib/Ice/Metrics.rb +290 -0
  485. data/dist/lib/Ice/OperationMode.rb +58 -0
  486. data/dist/lib/Ice/Process.rb +34 -0
  487. data/dist/lib/Ice/PropertiesAdmin.rb +39 -0
  488. data/dist/lib/Ice/PropertyDict.rb +12 -0
  489. data/dist/lib/Ice/Proxy.rb +85 -0
  490. data/dist/lib/Ice/ProxyFunctions.rb +69 -0
  491. data/dist/lib/Ice/RemoteLogger.rb +176 -0
  492. data/dist/lib/Ice/ReplyStatus.rb +65 -0
  493. data/dist/lib/Ice/Router.rb +59 -0
  494. data/dist/lib/Ice/SliceChecksumDict.rb +12 -0
  495. data/dist/lib/Ice/SliceUtil.rb +41 -0
  496. data/dist/lib/Ice/Struct.rb +11 -0
  497. data/dist/lib/Ice/ToStringMode.rb +50 -0
  498. data/dist/lib/Ice/Value.rb +93 -0
  499. data/dist/lib/Ice/Version.rb +78 -0
  500. data/dist/lib/Ice.rb +37 -0
  501. data/dist/lib/IceBox/ServiceManager.rb +104 -0
  502. data/dist/lib/IceBox.rb +3 -0
  503. data/dist/lib/IceGrid/Admin.rb +1208 -0
  504. data/dist/lib/IceGrid/Descriptor.rb +989 -0
  505. data/dist/lib/IceGrid/Exception.rb +145 -0
  506. data/dist/lib/IceGrid/FileParser.rb +41 -0
  507. data/dist/lib/IceGrid/Registry.rb +168 -0
  508. data/dist/lib/IceGrid/Session.rb +56 -0
  509. data/dist/lib/IceGrid/UserAccountMapper.rb +38 -0
  510. data/dist/lib/IceGrid.rb +9 -0
  511. data/dist/lib/IceStorm/IceStorm.rb +251 -0
  512. data/dist/lib/IceStorm/Metrics.rb +55 -0
  513. data/dist/lib/IceStorm.rb +4 -0
  514. data/extconf.rb +89 -0
  515. data/ice.gemspec +22 -17
  516. data/scripts/slice2rb +10 -0
  517. metadata +536 -712
  518. data/ICE_LICENSE +0 -48
  519. data/LICENSE +0 -340
  520. data/MCPP_LICENSE +0 -29
  521. data/bin/slice2rb +0 -12
  522. data/ext/Communicator.cpp +0 -792
  523. data/ext/Communicator.h +0 -20
  524. data/ext/Config.h +0 -143
  525. data/ext/Connection.cpp +0 -532
  526. data/ext/Connection.h +0 -24
  527. data/ext/Endpoint.cpp +0 -340
  528. data/ext/Endpoint.h +0 -22
  529. data/ext/ImplicitContext.cpp +0 -144
  530. data/ext/ImplicitContext.h +0 -20
  531. data/ext/Init.cpp +0 -49
  532. data/ext/Logger.cpp +0 -147
  533. data/ext/Logger.h +0 -23
  534. data/ext/Operation.cpp +0 -661
  535. data/ext/Operation.h +0 -31
  536. data/ext/Properties.cpp +0 -365
  537. data/ext/Properties.h +0 -20
  538. data/ext/Proxy.cpp +0 -1396
  539. data/ext/Proxy.h +0 -22
  540. data/ext/Slice.cpp +0 -205
  541. data/ext/Slice.h +0 -17
  542. data/ext/Types.cpp +0 -3325
  543. data/ext/Types.h +0 -595
  544. data/ext/Util.cpp +0 -812
  545. data/ext/Util.h +0 -586
  546. data/ext/ValueFactoryManager.cpp +0 -441
  547. data/ext/ValueFactoryManager.h +0 -95
  548. data/ext/extconf.rb +0 -97
  549. data/ext/ice/cpp/include/Ice/Application.h +0 -326
  550. data/ext/ice/cpp/include/Ice/AsyncResult.h +0 -155
  551. data/ext/ice/cpp/include/Ice/AsyncResultF.h +0 -23
  552. data/ext/ice/cpp/include/Ice/BatchRequestInterceptor.h +0 -75
  553. data/ext/ice/cpp/include/Ice/BatchRequestQueueF.h +0 -20
  554. data/ext/ice/cpp/include/Ice/Buffer.h +0 -154
  555. data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +0 -154
  556. data/ext/ice/cpp/include/Ice/Comparable.h +0 -205
  557. data/ext/ice/cpp/include/Ice/Config.h +0 -78
  558. data/ext/ice/cpp/include/Ice/ConnectionAsync.h +0 -302
  559. data/ext/ice/cpp/include/Ice/ConnectionIF.h +0 -38
  560. data/ext/ice/cpp/include/Ice/ConsoleUtil.h +0 -23
  561. data/ext/ice/cpp/include/Ice/DefaultValueFactory.h +0 -57
  562. data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +0 -41
  563. data/ext/ice/cpp/include/Ice/Dispatcher.h +0 -67
  564. data/ext/ice/cpp/include/Ice/DynamicLibrary.h +0 -102
  565. data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +0 -24
  566. data/ext/ice/cpp/include/Ice/Exception.h +0 -161
  567. data/ext/ice/cpp/include/Ice/ExceptionHelpers.h +0 -74
  568. data/ext/ice/cpp/include/Ice/FactoryTable.h +0 -73
  569. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +0 -84
  570. data/ext/ice/cpp/include/Ice/Format.h +0 -38
  571. data/ext/ice/cpp/include/Ice/Functional.h +0 -140
  572. data/ext/ice/cpp/include/Ice/GCObject.h +0 -76
  573. data/ext/ice/cpp/include/Ice/Handle.h +0 -182
  574. data/ext/ice/cpp/include/Ice/Ice.h +0 -55
  575. data/ext/ice/cpp/include/Ice/IconvStringConverter.h +0 -377
  576. data/ext/ice/cpp/include/Ice/Incoming.h +0 -225
  577. data/ext/ice/cpp/include/Ice/IncomingAsync.h +0 -186
  578. data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +0 -36
  579. data/ext/ice/cpp/include/Ice/Initialize.h +0 -957
  580. data/ext/ice/cpp/include/Ice/InputStream.h +0 -1514
  581. data/ext/ice/cpp/include/Ice/InstanceF.h +0 -20
  582. data/ext/ice/cpp/include/Ice/InterfaceByValue.h +0 -57
  583. data/ext/ice/cpp/include/Ice/LocalObject.h +0 -35
  584. data/ext/ice/cpp/include/Ice/LocalObjectF.h +0 -21
  585. data/ext/ice/cpp/include/Ice/LoggerUtil.h +0 -185
  586. data/ext/ice/cpp/include/Ice/MetricsAdminI.h +0 -715
  587. data/ext/ice/cpp/include/Ice/MetricsFunctional.h +0 -159
  588. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +0 -669
  589. data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +0 -86
  590. data/ext/ice/cpp/include/Ice/Object.h +0 -507
  591. data/ext/ice/cpp/include/Ice/ObjectF.h +0 -30
  592. data/ext/ice/cpp/include/Ice/ObserverHelper.h +0 -182
  593. data/ext/ice/cpp/include/Ice/Optional.h +0 -1114
  594. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +0 -856
  595. data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +0 -39
  596. data/ext/ice/cpp/include/Ice/OutputStream.h +0 -1092
  597. data/ext/ice/cpp/include/Ice/Protocol.h +0 -274
  598. data/ext/ice/cpp/include/Ice/Proxy.h +0 -5154
  599. data/ext/ice/cpp/include/Ice/ProxyF.h +0 -53
  600. data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +0 -21
  601. data/ext/ice/cpp/include/Ice/ProxyHandle.h +0 -318
  602. data/ext/ice/cpp/include/Ice/ReferenceF.h +0 -29
  603. data/ext/ice/cpp/include/Ice/RegisterPlugins.h +0 -127
  604. data/ext/ice/cpp/include/Ice/RequestHandlerF.h +0 -30
  605. data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +0 -25
  606. data/ext/ice/cpp/include/Ice/SHA1.h +0 -42
  607. data/ext/ice/cpp/include/Ice/ServantManagerF.h +0 -21
  608. data/ext/ice/cpp/include/Ice/Service.h +0 -379
  609. data/ext/ice/cpp/include/Ice/SliceChecksums.h +0 -33
  610. data/ext/ice/cpp/include/Ice/SlicedData.h +0 -172
  611. data/ext/ice/cpp/include/Ice/SlicedDataF.h +0 -40
  612. data/ext/ice/cpp/include/Ice/StreamHelpers.h +0 -1190
  613. data/ext/ice/cpp/include/Ice/StringConverter.h +0 -78
  614. data/ext/ice/cpp/include/Ice/ThreadPoolF.h +0 -23
  615. data/ext/ice/cpp/include/Ice/UUID.h +0 -19
  616. data/ext/ice/cpp/include/Ice/UniquePtr.h +0 -95
  617. data/ext/ice/cpp/include/Ice/UniqueRef.h +0 -97
  618. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +0 -88
  619. data/ext/ice/cpp/include/Ice/Value.h +0 -139
  620. data/ext/ice/cpp/include/Ice/ValueF.h +0 -21
  621. data/ext/ice/cpp/include/IceSSL/Config.h +0 -21
  622. data/ext/ice/cpp/include/IceSSL/IceSSL.h +0 -28
  623. data/ext/ice/cpp/include/IceSSL/OpenSSL.h +0 -147
  624. data/ext/ice/cpp/include/IceSSL/Plugin.h +0 -712
  625. data/ext/ice/cpp/include/IceSSL/SChannel.h +0 -72
  626. data/ext/ice/cpp/include/IceSSL/SecureTransport.h +0 -72
  627. data/ext/ice/cpp/include/IceSSL/UWP.h +0 -62
  628. data/ext/ice/cpp/include/IceUtil/Atomic.h +0 -179
  629. data/ext/ice/cpp/include/IceUtil/Cond.h +0 -317
  630. data/ext/ice/cpp/include/IceUtil/Config.h +0 -424
  631. data/ext/ice/cpp/include/IceUtil/ConsoleUtil.h +0 -92
  632. data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +0 -45
  633. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +0 -92
  634. data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +0 -44
  635. data/ext/ice/cpp/include/IceUtil/Exception.h +0 -394
  636. data/ext/ice/cpp/include/IceUtil/FileUtil.h +0 -143
  637. data/ext/ice/cpp/include/IceUtil/Functional.h +0 -389
  638. data/ext/ice/cpp/include/IceUtil/Handle.h +0 -261
  639. data/ext/ice/cpp/include/IceUtil/IceUtil.h +0 -40
  640. data/ext/ice/cpp/include/IceUtil/InputUtil.h +0 -42
  641. data/ext/ice/cpp/include/IceUtil/Iterator.h +0 -31
  642. data/ext/ice/cpp/include/IceUtil/Lock.h +0 -128
  643. data/ext/ice/cpp/include/IceUtil/Monitor.h +0 -243
  644. data/ext/ice/cpp/include/IceUtil/Mutex.h +0 -353
  645. data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +0 -23
  646. data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +0 -78
  647. data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +0 -77
  648. data/ext/ice/cpp/include/IceUtil/Optional.h +0 -433
  649. data/ext/ice/cpp/include/IceUtil/Options.h +0 -135
  650. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +0 -383
  651. data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +0 -14
  652. data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +0 -33
  653. data/ext/ice/cpp/include/IceUtil/Random.h +0 -55
  654. data/ext/ice/cpp/include/IceUtil/RecMutex.h +0 -107
  655. data/ext/ice/cpp/include/IceUtil/ResourceConfig.h +0 -53
  656. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +0 -40
  657. data/ext/ice/cpp/include/IceUtil/ScopedArray.h +0 -98
  658. data/ext/ice/cpp/include/IceUtil/Shared.h +0 -127
  659. data/ext/ice/cpp/include/IceUtil/StopWatch.h +0 -49
  660. data/ext/ice/cpp/include/IceUtil/StringConverter.h +0 -195
  661. data/ext/ice/cpp/include/IceUtil/StringUtil.h +0 -97
  662. data/ext/ice/cpp/include/IceUtil/Thread.h +0 -174
  663. data/ext/ice/cpp/include/IceUtil/ThreadException.h +0 -94
  664. data/ext/ice/cpp/include/IceUtil/Time.h +0 -205
  665. data/ext/ice/cpp/include/IceUtil/Timer.h +0 -143
  666. data/ext/ice/cpp/include/IceUtil/UUID.h +0 -21
  667. data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +0 -37
  668. data/ext/ice/cpp/include/generated/Ice/BuiltinSequences.h +0 -170
  669. data/ext/ice/cpp/include/generated/Ice/Communicator.h +0 -1162
  670. data/ext/ice/cpp/include/generated/Ice/CommunicatorF.h +0 -101
  671. data/ext/ice/cpp/include/generated/Ice/Connection.h +0 -1703
  672. data/ext/ice/cpp/include/generated/Ice/ConnectionF.h +0 -119
  673. data/ext/ice/cpp/include/generated/Ice/Current.h +0 -322
  674. data/ext/ice/cpp/include/generated/Ice/Endpoint.h +0 -979
  675. data/ext/ice/cpp/include/generated/Ice/EndpointF.h +0 -166
  676. data/ext/ice/cpp/include/generated/Ice/EndpointTypes.h +0 -118
  677. data/ext/ice/cpp/include/generated/Ice/FacetMap.h +0 -80
  678. data/ext/ice/cpp/include/generated/Ice/Identity.h +0 -264
  679. data/ext/ice/cpp/include/generated/Ice/ImplicitContext.h +0 -284
  680. data/ext/ice/cpp/include/generated/Ice/ImplicitContextF.h +0 -101
  681. data/ext/ice/cpp/include/generated/Ice/Instrumentation.h +0 -1203
  682. data/ext/ice/cpp/include/generated/Ice/InstrumentationF.h +0 -128
  683. data/ext/ice/cpp/include/generated/Ice/LocalException.h +0 -7437
  684. data/ext/ice/cpp/include/generated/Ice/Locator.h +0 -3898
  685. data/ext/ice/cpp/include/generated/Ice/LocatorF.h +0 -147
  686. data/ext/ice/cpp/include/generated/Ice/Logger.h +0 -237
  687. data/ext/ice/cpp/include/generated/Ice/LoggerF.h +0 -101
  688. data/ext/ice/cpp/include/generated/Ice/Metrics.h +0 -4769
  689. data/ext/ice/cpp/include/generated/Ice/ObjectAdapter.h +0 -1181
  690. data/ext/ice/cpp/include/generated/Ice/ObjectAdapterF.h +0 -101
  691. data/ext/ice/cpp/include/generated/Ice/ObjectFactory.h +0 -203
  692. data/ext/ice/cpp/include/generated/Ice/Plugin.h +0 -318
  693. data/ext/ice/cpp/include/generated/Ice/PluginF.h +0 -110
  694. data/ext/ice/cpp/include/generated/Ice/Process.h +0 -977
  695. data/ext/ice/cpp/include/generated/Ice/ProcessF.h +0 -125
  696. data/ext/ice/cpp/include/generated/Ice/Properties.h +0 -452
  697. data/ext/ice/cpp/include/generated/Ice/PropertiesAdmin.h +0 -1366
  698. data/ext/ice/cpp/include/generated/Ice/PropertiesF.h +0 -134
  699. data/ext/ice/cpp/include/generated/Ice/RemoteLogger.h +0 -2707
  700. data/ext/ice/cpp/include/generated/Ice/Router.h +0 -1850
  701. data/ext/ice/cpp/include/generated/Ice/RouterF.h +0 -125
  702. data/ext/ice/cpp/include/generated/Ice/ServantLocator.h +0 -305
  703. data/ext/ice/cpp/include/generated/Ice/ServantLocatorF.h +0 -101
  704. data/ext/ice/cpp/include/generated/Ice/SliceChecksumDict.h +0 -84
  705. data/ext/ice/cpp/include/generated/Ice/ValueFactory.h +0 -330
  706. data/ext/ice/cpp/include/generated/Ice/Version.h +0 -357
  707. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +0 -228
  708. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +0 -101
  709. data/ext/ice/cpp/include/generated/IceSSL/EndpointInfo.h +0 -186
  710. data/ext/ice/cpp/src/Ice/ACM.cpp +0 -380
  711. data/ext/ice/cpp/src/Ice/ACM.h +0 -119
  712. data/ext/ice/cpp/src/Ice/ACMF.h +0 -30
  713. data/ext/ice/cpp/src/Ice/Acceptor.cpp +0 -16
  714. data/ext/ice/cpp/src/Ice/Acceptor.h +0 -37
  715. data/ext/ice/cpp/src/Ice/AcceptorF.h +0 -25
  716. data/ext/ice/cpp/src/Ice/ArgVector.cpp +0 -59
  717. data/ext/ice/cpp/src/Ice/ArgVector.h +0 -36
  718. data/ext/ice/cpp/src/Ice/AsyncResult.cpp +0 -70
  719. data/ext/ice/cpp/src/Ice/Base64.cpp +0 -263
  720. data/ext/ice/cpp/src/Ice/Base64.h +0 -31
  721. data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +0 -250
  722. data/ext/ice/cpp/src/Ice/BatchRequestQueue.h +0 -59
  723. data/ext/ice/cpp/src/Ice/Buffer.cpp +0 -155
  724. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +0 -49
  725. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +0 -407
  726. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +0 -87
  727. data/ext/ice/cpp/src/Ice/Communicator.cpp +0 -79
  728. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +0 -61
  729. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +0 -586
  730. data/ext/ice/cpp/src/Ice/CommunicatorI.h +0 -167
  731. data/ext/ice/cpp/src/Ice/Cond.cpp +0 -381
  732. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +0 -348
  733. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +0 -72
  734. data/ext/ice/cpp/src/Ice/ConnectRequestHandlerF.h +0 -24
  735. data/ext/ice/cpp/src/Ice/Connection.cpp +0 -155
  736. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +0 -61
  737. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +0 -1972
  738. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +0 -264
  739. data/ext/ice/cpp/src/Ice/ConnectionFactoryF.h +0 -30
  740. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +0 -3670
  741. data/ext/ice/cpp/src/Ice/ConnectionI.h +0 -391
  742. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +0 -73
  743. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +0 -41
  744. data/ext/ice/cpp/src/Ice/Connector.cpp +0 -16
  745. data/ext/ice/cpp/src/Ice/Connector.h +0 -32
  746. data/ext/ice/cpp/src/Ice/ConnectorF.h +0 -21
  747. data/ext/ice/cpp/src/Ice/CountDownLatch.cpp +0 -179
  748. data/ext/ice/cpp/src/Ice/Current.cpp +0 -62
  749. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +0 -161
  750. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +0 -52
  751. data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +0 -21
  752. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +0 -37
  753. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +0 -291
  754. data/ext/ice/cpp/src/Ice/Endpoint.cpp +0 -147
  755. data/ext/ice/cpp/src/Ice/EndpointF.cpp +0 -61
  756. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +0 -189
  757. data/ext/ice/cpp/src/Ice/EndpointFactory.h +0 -117
  758. data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +0 -21
  759. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +0 -213
  760. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +0 -47
  761. data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +0 -21
  762. data/ext/ice/cpp/src/Ice/EndpointI.cpp +0 -98
  763. data/ext/ice/cpp/src/Ice/EndpointI.h +0 -218
  764. data/ext/ice/cpp/src/Ice/EndpointIF.h +0 -49
  765. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +0 -51
  766. data/ext/ice/cpp/src/Ice/EventHandler.cpp +0 -32
  767. data/ext/ice/cpp/src/Ice/EventHandler.h +0 -81
  768. data/ext/ice/cpp/src/Ice/EventHandlerF.h +0 -24
  769. data/ext/ice/cpp/src/Ice/Exception.cpp +0 -845
  770. data/ext/ice/cpp/src/Ice/FacetMap.cpp +0 -49
  771. data/ext/ice/cpp/src/Ice/FactoryTable.cpp +0 -162
  772. data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +0 -88
  773. data/ext/ice/cpp/src/Ice/GCObject.cpp +0 -442
  774. data/ext/ice/cpp/src/Ice/HashUtil.h +0 -53
  775. data/ext/ice/cpp/src/Ice/HttpParser.cpp +0 -684
  776. data/ext/ice/cpp/src/Ice/HttpParser.h +0 -117
  777. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +0 -756
  778. data/ext/ice/cpp/src/Ice/IPEndpointI.h +0 -162
  779. data/ext/ice/cpp/src/Ice/IPEndpointIF.h +0 -28
  780. data/ext/ice/cpp/src/Ice/IconvStringConverter.cpp +0 -51
  781. data/ext/ice/cpp/src/Ice/Identity.cpp +0 -57
  782. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +0 -75
  783. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +0 -61
  784. data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +0 -655
  785. data/ext/ice/cpp/src/Ice/ImplicitContextI.h +0 -48
  786. data/ext/ice/cpp/src/Ice/Incoming.cpp +0 -795
  787. data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +0 -230
  788. data/ext/ice/cpp/src/Ice/IncomingRequest.h +0 -33
  789. data/ext/ice/cpp/src/Ice/Initialize.cpp +0 -654
  790. data/ext/ice/cpp/src/Ice/InputStream.cpp +0 -2741
  791. data/ext/ice/cpp/src/Ice/Instance.cpp +0 -1971
  792. data/ext/ice/cpp/src/Ice/Instance.h +0 -235
  793. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +0 -188
  794. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +0 -66
  795. data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +0 -1094
  796. data/ext/ice/cpp/src/Ice/InstrumentationI.h +0 -256
  797. data/ext/ice/cpp/src/Ice/LocalException.cpp +0 -3262
  798. data/ext/ice/cpp/src/Ice/LocalObject.cpp +0 -23
  799. data/ext/ice/cpp/src/Ice/Locator.cpp +0 -2042
  800. data/ext/ice/cpp/src/Ice/LocatorF.cpp +0 -63
  801. data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +0 -889
  802. data/ext/ice/cpp/src/Ice/LocatorInfo.h +0 -189
  803. data/ext/ice/cpp/src/Ice/LocatorInfoF.h +0 -29
  804. data/ext/ice/cpp/src/Ice/Logger.cpp +0 -73
  805. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +0 -956
  806. data/ext/ice/cpp/src/Ice/LoggerAdminI.h +0 -41
  807. data/ext/ice/cpp/src/Ice/LoggerF.cpp +0 -61
  808. data/ext/ice/cpp/src/Ice/LoggerI.cpp +0 -261
  809. data/ext/ice/cpp/src/Ice/LoggerI.h +0 -52
  810. data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +0 -100
  811. data/ext/ice/cpp/src/Ice/Metrics.cpp +0 -2352
  812. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +0 -694
  813. data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +0 -8
  814. data/ext/ice/cpp/src/Ice/Network.cpp +0 -3075
  815. data/ext/ice/cpp/src/Ice/Network.h +0 -371
  816. data/ext/ice/cpp/src/Ice/NetworkF.h +0 -23
  817. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +0 -324
  818. data/ext/ice/cpp/src/Ice/NetworkProxy.h +0 -72
  819. data/ext/ice/cpp/src/Ice/NetworkProxyF.h +0 -21
  820. data/ext/ice/cpp/src/Ice/OSLogLoggerI.cpp +0 -57
  821. data/ext/ice/cpp/src/Ice/OSLogLoggerI.h +0 -40
  822. data/ext/ice/cpp/src/Ice/Object.cpp +0 -435
  823. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +0 -79
  824. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +0 -61
  825. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +0 -291
  826. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +0 -53
  827. data/ext/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +0 -25
  828. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +0 -1530
  829. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +0 -159
  830. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +0 -75
  831. data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +0 -56
  832. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +0 -408
  833. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +0 -74
  834. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +0 -1322
  835. data/ext/ice/cpp/src/Ice/OutputStream.cpp +0 -1367
  836. data/ext/ice/cpp/src/Ice/Plugin.cpp +0 -87
  837. data/ext/ice/cpp/src/Ice/PluginF.cpp +0 -61
  838. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +0 -503
  839. data/ext/ice/cpp/src/Ice/PluginManagerI.h +0 -61
  840. data/ext/ice/cpp/src/Ice/Process.cpp +0 -471
  841. data/ext/ice/cpp/src/Ice/ProcessF.cpp +0 -63
  842. data/ext/ice/cpp/src/Ice/Properties.cpp +0 -78
  843. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +0 -603
  844. data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +0 -265
  845. data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +0 -64
  846. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +0 -63
  847. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +0 -747
  848. data/ext/ice/cpp/src/Ice/PropertiesI.h +0 -70
  849. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +0 -1429
  850. data/ext/ice/cpp/src/Ice/PropertyNames.h +0 -78
  851. data/ext/ice/cpp/src/Ice/Protocol.cpp +0 -124
  852. data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -131
  853. data/ext/ice/cpp/src/Ice/ProtocolInstance.h +0 -93
  854. data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +0 -21
  855. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +0 -51
  856. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +0 -64
  857. data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +0 -21
  858. data/ext/ice/cpp/src/Ice/Proxy.cpp +0 -1601
  859. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +0 -300
  860. data/ext/ice/cpp/src/Ice/ProxyFactory.h +0 -57
  861. data/ext/ice/cpp/src/Ice/Reference.cpp +0 -2046
  862. data/ext/ice/cpp/src/Ice/Reference.h +0 -323
  863. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +0 -888
  864. data/ext/ice/cpp/src/Ice/ReferenceFactory.h +0 -76
  865. data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +0 -19
  866. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.cpp +0 -38
  867. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.h +0 -20
  868. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +0 -1171
  869. data/ext/ice/cpp/src/Ice/ReplyStatus.h +0 -24
  870. data/ext/ice/cpp/src/Ice/RequestHandler.cpp +0 -37
  871. data/ext/ice/cpp/src/Ice/RequestHandler.h +0 -78
  872. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +0 -77
  873. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +0 -37
  874. data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +0 -12
  875. data/ext/ice/cpp/src/Ice/ResponseHandler.h +0 -43
  876. data/ext/ice/cpp/src/Ice/RetryQueue.cpp +0 -157
  877. data/ext/ice/cpp/src/Ice/RetryQueue.h +0 -66
  878. data/ext/ice/cpp/src/Ice/RetryQueueF.h +0 -19
  879. data/ext/ice/cpp/src/Ice/Router.cpp +0 -977
  880. data/ext/ice/cpp/src/Ice/RouterF.cpp +0 -63
  881. data/ext/ice/cpp/src/Ice/RouterInfo.cpp +0 -379
  882. data/ext/ice/cpp/src/Ice/RouterInfo.h +0 -152
  883. data/ext/ice/cpp/src/Ice/RouterInfoF.h +0 -25
  884. data/ext/ice/cpp/src/Ice/SHA1.cpp +0 -185
  885. data/ext/ice/cpp/src/Ice/Selector.cpp +0 -1537
  886. data/ext/ice/cpp/src/Ice/Selector.h +0 -308
  887. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +0 -75
  888. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +0 -61
  889. data/ext/ice/cpp/src/Ice/ServantManager.cpp +0 -480
  890. data/ext/ice/cpp/src/Ice/ServantManager.h +0 -69
  891. data/ext/ice/cpp/src/Ice/SharedContext.h +0 -46
  892. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +0 -49
  893. data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +0 -75
  894. data/ext/ice/cpp/src/Ice/SlicedData.cpp +0 -127
  895. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +0 -682
  896. data/ext/ice/cpp/src/Ice/StreamSocket.h +0 -92
  897. data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +0 -192
  898. data/ext/ice/cpp/src/Ice/StringUtil.h +0 -30
  899. data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +0 -166
  900. data/ext/ice/cpp/src/Ice/SysLoggerI.h +0 -37
  901. data/ext/ice/cpp/src/Ice/SystemdJournalI.cpp +0 -66
  902. data/ext/ice/cpp/src/Ice/SystemdJournalI.h +0 -39
  903. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +0 -355
  904. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +0 -69
  905. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +0 -127
  906. data/ext/ice/cpp/src/Ice/TcpConnector.h +0 -45
  907. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +0 -385
  908. data/ext/ice/cpp/src/Ice/TcpEndpointI.h +0 -90
  909. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +0 -135
  910. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +0 -58
  911. data/ext/ice/cpp/src/Ice/Thread.cpp +0 -811
  912. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +0 -1328
  913. data/ext/ice/cpp/src/Ice/ThreadPool.h +0 -393
  914. data/ext/ice/cpp/src/Ice/Timer.cpp +0 -263
  915. data/ext/ice/cpp/src/Ice/TraceLevels.cpp +0 -38
  916. data/ext/ice/cpp/src/Ice/TraceLevels.h +0 -45
  917. data/ext/ice/cpp/src/Ice/TraceLevelsF.h +0 -21
  918. data/ext/ice/cpp/src/Ice/TraceUtil.cpp +0 -478
  919. data/ext/ice/cpp/src/Ice/TraceUtil.h +0 -30
  920. data/ext/ice/cpp/src/Ice/Transceiver.cpp +0 -18
  921. data/ext/ice/cpp/src/Ice/Transceiver.h +0 -49
  922. data/ext/ice/cpp/src/Ice/TransceiverF.h +0 -33
  923. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +0 -136
  924. data/ext/ice/cpp/src/Ice/UdpConnector.h +0 -45
  925. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +0 -515
  926. data/ext/ice/cpp/src/Ice/UdpEndpointI.h +0 -95
  927. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +0 -1153
  928. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +0 -117
  929. data/ext/ice/cpp/src/Ice/Value.cpp +0 -76
  930. data/ext/ice/cpp/src/Ice/ValueFactory.cpp +0 -83
  931. data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +0 -61
  932. data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.h +0 -37
  933. data/ext/ice/cpp/src/Ice/Version.cpp +0 -57
  934. data/ext/ice/cpp/src/Ice/VirtualShared.h +0 -38
  935. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +0 -92
  936. data/ext/ice/cpp/src/Ice/WSAcceptor.h +0 -52
  937. data/ext/ice/cpp/src/Ice/WSConnector.cpp +0 -102
  938. data/ext/ice/cpp/src/Ice/WSConnector.h +0 -43
  939. data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +0 -508
  940. data/ext/ice/cpp/src/Ice/WSEndpoint.h +0 -93
  941. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +0 -1747
  942. data/ext/ice/cpp/src/Ice/WSTransceiver.h +0 -141
  943. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +0 -915
  944. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +0 -1889
  945. data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +0 -265
  946. data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +0 -109
  947. data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +0 -608
  948. data/ext/ice/cpp/src/IceDiscovery/LookupI.h +0 -228
  949. data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +0 -176
  950. data/ext/ice/cpp/src/IceDiscovery/PluginI.h +0 -36
  951. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +0 -730
  952. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +0 -1197
  953. data/ext/ice/cpp/src/IceLocatorDiscovery/Plugin.h +0 -47
  954. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +0 -1048
  955. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +0 -105
  956. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +0 -52
  957. data/ext/ice/cpp/src/IceSSL/CertificateI.cpp +0 -301
  958. data/ext/ice/cpp/src/IceSSL/CertificateI.h +0 -64
  959. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +0 -75
  960. data/ext/ice/cpp/src/IceSSL/ConnectionInfoF.cpp +0 -61
  961. data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +0 -102
  962. data/ext/ice/cpp/src/IceSSL/ConnectorI.h +0 -44
  963. data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +0 -372
  964. data/ext/ice/cpp/src/IceSSL/EndpointI.h +0 -100
  965. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +0 -75
  966. data/ext/ice/cpp/src/IceSSL/Instance.cpp +0 -28
  967. data/ext/ice/cpp/src/IceSSL/Instance.h +0 -37
  968. data/ext/ice/cpp/src/IceSSL/InstanceF.h +0 -33
  969. data/ext/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +0 -688
  970. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +0 -1147
  971. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -59
  972. data/ext/ice/cpp/src/IceSSL/OpenSSLEngineF.h +0 -27
  973. data/ext/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +0 -127
  974. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +0 -1092
  975. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +0 -90
  976. data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +0 -288
  977. data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.h +0 -58
  978. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +0 -246
  979. data/ext/ice/cpp/src/IceSSL/PluginI.h +0 -67
  980. data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +0 -490
  981. data/ext/ice/cpp/src/IceSSL/RFC2253.h +0 -62
  982. data/ext/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +0 -721
  983. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -1283
  984. data/ext/ice/cpp/src/IceSSL/SChannelEngine.h +0 -123
  985. data/ext/ice/cpp/src/IceSSL/SChannelEngineF.h +0 -31
  986. data/ext/ice/cpp/src/IceSSL/SChannelPluginI.cpp +0 -73
  987. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +0 -1174
  988. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +0 -133
  989. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +0 -313
  990. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +0 -100
  991. data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +0 -21
  992. data/ext/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +0 -999
  993. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +0 -1308
  994. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.h +0 -59
  995. data/ext/ice/cpp/src/IceSSL/SecureTransportEngineF.h +0 -29
  996. data/ext/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +0 -75
  997. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +0 -719
  998. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +0 -92
  999. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +0 -868
  1000. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.h +0 -45
  1001. data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +0 -236
  1002. data/ext/ice/cpp/src/IceSSL/TrustManager.h +0 -46
  1003. data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +0 -21
  1004. data/ext/ice/cpp/src/IceSSL/UWPCertificateI.cpp +0 -266
  1005. data/ext/ice/cpp/src/IceSSL/UWPEngine.cpp +0 -338
  1006. data/ext/ice/cpp/src/IceSSL/UWPEngine.h +0 -41
  1007. data/ext/ice/cpp/src/IceSSL/UWPEngineF.h +0 -26
  1008. data/ext/ice/cpp/src/IceSSL/UWPPluginI.cpp +0 -89
  1009. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.cpp +0 -383
  1010. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.h +0 -71
  1011. data/ext/ice/cpp/src/IceSSL/Util.cpp +0 -192
  1012. data/ext/ice/cpp/src/IceSSL/Util.h +0 -99
  1013. data/ext/ice/cpp/src/IceUtil/ConsoleUtil.cpp +0 -157
  1014. data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +0 -472
  1015. data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +0 -147
  1016. data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +0 -259
  1017. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +0 -484
  1018. data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +0 -36
  1019. data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +0 -19
  1020. data/ext/ice/cpp/src/IceUtil/Options.cpp +0 -1051
  1021. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +0 -609
  1022. data/ext/ice/cpp/src/IceUtil/Random.cpp +0 -180
  1023. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +0 -242
  1024. data/ext/ice/cpp/src/IceUtil/Shared.cpp +0 -71
  1025. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +0 -690
  1026. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +0 -1180
  1027. data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +0 -130
  1028. data/ext/ice/cpp/src/IceUtil/Time.cpp +0 -307
  1029. data/ext/ice/cpp/src/IceUtil/UUID.cpp +0 -169
  1030. data/ext/ice/cpp/src/IceUtil/Unicode.cpp +0 -183
  1031. data/ext/ice/cpp/src/IceUtil/Unicode.h +0 -43
  1032. data/ext/ice/cpp/src/IceUtil/UtilException.cpp +0 -839
  1033. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +0 -1810
  1034. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.h +0 -72
  1035. data/ext/ice/cpp/src/Slice/Checksum.cpp +0 -447
  1036. data/ext/ice/cpp/src/Slice/Checksum.h +0 -21
  1037. data/ext/ice/cpp/src/Slice/FileTracker.cpp +0 -146
  1038. data/ext/ice/cpp/src/Slice/FileTracker.h +0 -66
  1039. data/ext/ice/cpp/src/Slice/Grammar.cpp +0 -4793
  1040. data/ext/ice/cpp/src/Slice/Grammar.h +0 -118
  1041. data/ext/ice/cpp/src/Slice/GrammarUtil.h +0 -228
  1042. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +0 -5154
  1043. data/ext/ice/cpp/src/Slice/JavaUtil.h +0 -398
  1044. data/ext/ice/cpp/src/Slice/MD5.cpp +0 -52
  1045. data/ext/ice/cpp/src/Slice/MD5.h +0 -39
  1046. data/ext/ice/cpp/src/Slice/MD5I.cpp +0 -393
  1047. data/ext/ice/cpp/src/Slice/MD5I.h +0 -91
  1048. data/ext/ice/cpp/src/Slice/PHPUtil.cpp +0 -157
  1049. data/ext/ice/cpp/src/Slice/PHPUtil.h +0 -36
  1050. data/ext/ice/cpp/src/Slice/Parser.cpp +0 -7058
  1051. data/ext/ice/cpp/src/Slice/Parser.h +0 -1174
  1052. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +0 -797
  1053. data/ext/ice/cpp/src/Slice/Preprocessor.h +0 -60
  1054. data/ext/ice/cpp/src/Slice/Python.cpp +0 -830
  1055. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +0 -3439
  1056. data/ext/ice/cpp/src/Slice/PythonUtil.h +0 -70
  1057. data/ext/ice/cpp/src/Slice/Ruby.cpp +0 -350
  1058. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +0 -1571
  1059. data/ext/ice/cpp/src/Slice/RubyUtil.h +0 -49
  1060. data/ext/ice/cpp/src/Slice/Scanner.cpp +0 -2807
  1061. data/ext/ice/cpp/src/Slice/SliceUtil.cpp +0 -424
  1062. data/ext/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -456
  1063. data/ext/ice/cpp/src/Slice/Util.h +0 -50
  1064. data/ext/ice/mcpp/CMakeLists.txt +0 -80
  1065. data/ext/ice/mcpp/LICENSE +0 -29
  1066. data/ext/ice/mcpp/Makefile +0 -63
  1067. data/ext/ice/mcpp/README.md +0 -32
  1068. data/ext/ice/mcpp/internal.H +0 -530
  1069. data/ext/ice/mcpp/mcpp.gyp +0 -88
  1070. data/lib/Glacier2/Metrics.rb +0 -56
  1071. data/lib/Glacier2/PermissionsVerifier.rb +0 -93
  1072. data/lib/Glacier2/PermissionsVerifierF.rb +0 -30
  1073. data/lib/Glacier2/Router.rb +0 -95
  1074. data/lib/Glacier2/RouterF.rb +0 -25
  1075. data/lib/Glacier2/SSLInfo.rb +0 -72
  1076. data/lib/Glacier2/Session.rb +0 -247
  1077. data/lib/Glacier2.rb +0 -7
  1078. data/lib/Ice/BuiltinSequences.rb +0 -60
  1079. data/lib/Ice/Communicator.rb +0 -87
  1080. data/lib/Ice/CommunicatorF.rb +0 -24
  1081. data/lib/Ice/Connection.rb +0 -413
  1082. data/lib/Ice/ConnectionF.rb +0 -32
  1083. data/lib/Ice/Current.rb +0 -141
  1084. data/lib/Ice/Endpoint.rb +0 -187
  1085. data/lib/Ice/EndpointF.rb +0 -48
  1086. data/lib/Ice/EndpointTypes.rb +0 -69
  1087. data/lib/Ice/FacetMap.rb +0 -24
  1088. data/lib/Ice/Identity.rb +0 -63
  1089. data/lib/Ice/ImplicitContext.rb +0 -26
  1090. data/lib/Ice/ImplicitContextF.rb +0 -24
  1091. data/lib/Ice/Instrumentation.rb +0 -169
  1092. data/lib/Ice/InstrumentationF.rb +0 -31
  1093. data/lib/Ice/LocalException.rb +0 -1031
  1094. data/lib/Ice/Locator.rb +0 -196
  1095. data/lib/Ice/LocatorF.rb +0 -30
  1096. data/lib/Ice/Logger.rb +0 -24
  1097. data/lib/Ice/LoggerF.rb +0 -24
  1098. data/lib/Ice/Metrics.rb +0 -337
  1099. data/lib/Ice/ObjectAdapter.rb +0 -29
  1100. data/lib/Ice/ObjectAdapterF.rb +0 -24
  1101. data/lib/Ice/ObjectFactory.rb +0 -24
  1102. data/lib/Ice/Plugin.rb +0 -30
  1103. data/lib/Ice/PluginF.rb +0 -28
  1104. data/lib/Ice/Process.rb +0 -53
  1105. data/lib/Ice/ProcessF.rb +0 -25
  1106. data/lib/Ice/Properties.rb +0 -25
  1107. data/lib/Ice/PropertiesAdmin.rb +0 -63
  1108. data/lib/Ice/PropertiesF.rb +0 -29
  1109. data/lib/Ice/RemoteLogger.rb +0 -207
  1110. data/lib/Ice/Router.rb +0 -87
  1111. data/lib/Ice/RouterF.rb +0 -25
  1112. data/lib/Ice/ServantLocator.rb +0 -26
  1113. data/lib/Ice/ServantLocatorF.rb +0 -24
  1114. data/lib/Ice/SliceChecksumDict.rb +0 -24
  1115. data/lib/Ice/ValueFactory.rb +0 -28
  1116. data/lib/Ice/Version.rb +0 -90
  1117. data/lib/Ice.rb +0 -673
  1118. data/lib/IceBox/IceBox.rb +0 -164
  1119. data/lib/IceBox.rb +0 -5
  1120. data/lib/IceGrid/Admin.rb +0 -1196
  1121. data/lib/IceGrid/Descriptor.rb +0 -1034
  1122. data/lib/IceGrid/Exception.rb +0 -376
  1123. data/lib/IceGrid/FileParser.rb +0 -65
  1124. data/lib/IceGrid/PluginFacade.rb +0 -35
  1125. data/lib/IceGrid/Registry.rb +0 -209
  1126. data/lib/IceGrid/Session.rb +0 -71
  1127. data/lib/IceGrid/UserAccountMapper.rb +0 -61
  1128. data/lib/IceGrid.rb +0 -9
  1129. data/lib/IcePatch2/FileInfo.rb +0 -115
  1130. data/lib/IcePatch2/FileServer.rb +0 -123
  1131. data/lib/IcePatch2.rb +0 -5
  1132. data/lib/IceStorm/IceStorm.rb +0 -332
  1133. data/lib/IceStorm/Metrics.rb +0 -73
  1134. data/lib/IceStorm.rb +0 -6
  1135. data/slice/Glacier2/Metrics.ice +0 -88
  1136. data/slice/Glacier2/PermissionsVerifier.ice +0 -111
  1137. data/slice/Glacier2/PermissionsVerifierF.ice +0 -30
  1138. data/slice/Glacier2/Router.ice +0 -186
  1139. data/slice/Glacier2/RouterF.ice +0 -29
  1140. data/slice/Glacier2/SSLInfo.ice +0 -59
  1141. data/slice/Glacier2/Session.ice +0 -274
  1142. data/slice/Ice/BuiltinSequences.ice +0 -59
  1143. data/slice/Ice/Communicator.ice +0 -676
  1144. data/slice/Ice/CommunicatorF.ice +0 -31
  1145. data/slice/Ice/Connection.ice +0 -516
  1146. data/slice/Ice/ConnectionF.ice +0 -33
  1147. data/slice/Ice/Current.ice +0 -170
  1148. data/slice/Ice/Endpoint.ice +0 -291
  1149. data/slice/Ice/EndpointF.ice +0 -43
  1150. data/slice/Ice/EndpointTypes.ice +0 -48
  1151. data/slice/Ice/FacetMap.ice +0 -36
  1152. data/slice/Ice/Identity.ice +0 -75
  1153. data/slice/Ice/ImplicitContext.ice +0 -119
  1154. data/slice/Ice/ImplicitContextF.ice +0 -30
  1155. data/slice/Ice/Instrumentation.ice +0 -509
  1156. data/slice/Ice/InstrumentationF.ice +0 -38
  1157. data/slice/Ice/LocalException.ice +0 -1040
  1158. data/slice/Ice/Locator.ice +0 -239
  1159. data/slice/Ice/LocatorF.ice +0 -32
  1160. data/slice/Ice/Logger.ice +0 -99
  1161. data/slice/Ice/LoggerF.ice +0 -31
  1162. data/slice/Ice/Metrics.ice +0 -436
  1163. data/slice/Ice/ObjectAdapter.ice +0 -710
  1164. data/slice/Ice/ObjectAdapterF.ice +0 -31
  1165. data/slice/Ice/ObjectFactory.ice +0 -71
  1166. data/slice/Ice/Plugin.ice +0 -131
  1167. data/slice/Ice/PluginF.ice +0 -36
  1168. data/slice/Ice/Process.ice +0 -64
  1169. data/slice/Ice/ProcessF.ice +0 -31
  1170. data/slice/Ice/Properties.ice +0 -244
  1171. data/slice/Ice/PropertiesAdmin.ice +0 -87
  1172. data/slice/Ice/PropertiesF.ice +0 -32
  1173. data/slice/Ice/RemoteLogger.ice +0 -226
  1174. data/slice/Ice/Router.ice +0 -103
  1175. data/slice/Ice/RouterF.ice +0 -31
  1176. data/slice/Ice/ServantLocator.ice +0 -136
  1177. data/slice/Ice/ServantLocatorF.ice +0 -31
  1178. data/slice/Ice/SliceChecksumDict.ice +0 -36
  1179. data/slice/Ice/ValueFactory.ice +0 -133
  1180. data/slice/Ice/Version.ice +0 -51
  1181. data/slice/IceBT/ConnectionInfo.ice +0 -59
  1182. data/slice/IceBT/EndpointInfo.ice +0 -57
  1183. data/slice/IceBT/Types.ice +0 -45
  1184. data/slice/IceBox/IceBox.ice +0 -216
  1185. data/slice/IceDiscovery/IceDiscovery.ice +0 -98
  1186. data/slice/IceGrid/Admin.ice +0 -1957
  1187. data/slice/IceGrid/Descriptor.ice +0 -1094
  1188. data/slice/IceGrid/Exception.ice +0 -396
  1189. data/slice/IceGrid/FileParser.ice +0 -72
  1190. data/slice/IceGrid/PluginFacade.ice +0 -329
  1191. data/slice/IceGrid/Registry.ice +0 -269
  1192. data/slice/IceGrid/Session.ice +0 -128
  1193. data/slice/IceGrid/UserAccountMapper.ice +0 -69
  1194. data/slice/IceIAP/ConnectionInfo.ice +0 -74
  1195. data/slice/IceIAP/EndpointInfo.ice +0 -68
  1196. data/slice/IceLocatorDiscovery/IceLocatorDiscovery.ice +0 -83
  1197. data/slice/IcePatch2/FileInfo.ice +0 -85
  1198. data/slice/IcePatch2/FileServer.ice +0 -191
  1199. data/slice/IceSSL/ConnectionInfo.ice +0 -54
  1200. data/slice/IceSSL/ConnectionInfoF.ice +0 -31
  1201. data/slice/IceSSL/EndpointInfo.ice +0 -45
  1202. data/slice/IceStorm/IceStorm.ice +0 -414
  1203. data/slice/IceStorm/Metrics.ice +0 -83
  1204. /data/{ext → dist}/ice/mcpp/config.h +0 -0
  1205. /data/{ext → dist}/ice/mcpp/configed.H +0 -0
  1206. /data/{ext → dist}/ice/mcpp/directive.c +0 -0
  1207. /data/{ext → dist}/ice/mcpp/eval.c +0 -0
  1208. /data/{ext → dist}/ice/mcpp/expand.c +0 -0
  1209. /data/{ext → dist}/ice/mcpp/mbchar.c +0 -0
  1210. /data/{ext → dist}/ice/mcpp/mcpp_lib.h +0 -0
  1211. /data/{ext/ice/mcpp/main.c → dist/ice/mcpp/mcpp_main.c} +0 -0
  1212. /data/{ext → dist}/ice/mcpp/mcpp_out.h +0 -0
  1213. /data/{ext → dist}/ice/mcpp/support.c +0 -0
  1214. /data/{ext → dist}/ice/mcpp/system.H +0 -0
  1215. /data/{ext → dist}/ice/mcpp/system.c +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
- }