zeroc-ice 3.7.10 → 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 (1216) 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/mcpp/system.c +2741 -0
  436. data/dist/ice/slice/Glacier2/Metrics.ice +47 -0
  437. data/dist/ice/slice/Glacier2/PermissionsVerifier.ice +55 -0
  438. data/dist/ice/slice/Glacier2/Router.ice +93 -0
  439. data/dist/ice/slice/Glacier2/SSLInfo.ice +42 -0
  440. data/dist/ice/slice/Glacier2/Session.ice +133 -0
  441. data/dist/ice/slice/Ice/BuiltinSequences.ice +54 -0
  442. data/dist/ice/slice/Ice/Context.ice +24 -0
  443. data/dist/ice/slice/Ice/EndpointTypes.ice +50 -0
  444. data/dist/ice/slice/Ice/Identity.ice +36 -0
  445. data/dist/ice/slice/Ice/Locator.ice +74 -0
  446. data/dist/ice/slice/Ice/LocatorRegistry.ice +77 -0
  447. data/dist/ice/slice/Ice/Metrics.ice +201 -0
  448. data/dist/ice/slice/Ice/OperationMode.ice +38 -0
  449. data/dist/ice/slice/Ice/Process.ice +28 -0
  450. data/dist/ice/slice/Ice/PropertiesAdmin.ice +37 -0
  451. data/dist/ice/slice/Ice/PropertyDict.ice +23 -0
  452. data/dist/ice/slice/Ice/RemoteLogger.ice +126 -0
  453. data/dist/ice/slice/Ice/ReplyStatus.ice +65 -0
  454. data/dist/ice/slice/Ice/Router.ice +54 -0
  455. data/dist/ice/slice/Ice/SliceChecksumDict.ice +18 -0
  456. data/dist/ice/slice/Ice/Version.ice +43 -0
  457. data/dist/ice/slice/IceBox/ServiceManager.ice +79 -0
  458. data/dist/ice/slice/IceGrid/Admin.ice +981 -0
  459. data/dist/ice/slice/IceGrid/Descriptor.ice +519 -0
  460. data/dist/ice/slice/IceGrid/Exception.ice +98 -0
  461. data/dist/ice/slice/IceGrid/FileParser.ice +36 -0
  462. data/dist/ice/slice/IceGrid/Registry.ice +130 -0
  463. data/dist/ice/slice/IceGrid/Session.ice +64 -0
  464. data/dist/ice/slice/IceGrid/UserAccountMapper.ice +34 -0
  465. data/dist/ice/slice/IceStorm/IceStorm.ice +186 -0
  466. data/dist/ice/slice/IceStorm/Metrics.ice +41 -0
  467. data/dist/lib/Glacier2/Metrics.rb +41 -0
  468. data/dist/lib/Glacier2/PermissionsVerifier.rb +61 -0
  469. data/dist/lib/Glacier2/Router.rb +73 -0
  470. data/dist/lib/Glacier2/SSLInfo.rb +64 -0
  471. data/dist/lib/Glacier2/Session.rb +187 -0
  472. data/dist/lib/Glacier2.rb +7 -0
  473. data/dist/lib/Ice/BuiltinSequences.rb +48 -0
  474. data/dist/lib/Ice/CompressBatch.rb +50 -0
  475. data/dist/lib/Ice/Context.rb +12 -0
  476. data/dist/lib/Ice/EndpointSelectionType.rb +49 -0
  477. data/dist/lib/Ice/EndpointTypes.rb +28 -0
  478. data/dist/lib/Ice/Exception.rb +20 -0
  479. data/dist/lib/Ice/Identity.rb +47 -0
  480. data/dist/lib/Ice/IdentitySpaceship.rb +16 -0
  481. data/dist/lib/Ice/InitializationData.rb +12 -0
  482. data/dist/lib/Ice/LocalExceptions.rb +168 -0
  483. data/dist/lib/Ice/Locator.rb +83 -0
  484. data/dist/lib/Ice/LocatorRegistry.rb +73 -0
  485. data/dist/lib/Ice/Metrics.rb +290 -0
  486. data/dist/lib/Ice/OperationMode.rb +58 -0
  487. data/dist/lib/Ice/Process.rb +34 -0
  488. data/dist/lib/Ice/PropertiesAdmin.rb +39 -0
  489. data/dist/lib/Ice/PropertyDict.rb +12 -0
  490. data/dist/lib/Ice/Proxy.rb +85 -0
  491. data/dist/lib/Ice/ProxyFunctions.rb +69 -0
  492. data/dist/lib/Ice/RemoteLogger.rb +176 -0
  493. data/dist/lib/Ice/ReplyStatus.rb +65 -0
  494. data/dist/lib/Ice/Router.rb +59 -0
  495. data/dist/lib/Ice/SliceChecksumDict.rb +12 -0
  496. data/dist/lib/Ice/SliceUtil.rb +41 -0
  497. data/dist/lib/Ice/Struct.rb +11 -0
  498. data/dist/lib/Ice/ToStringMode.rb +50 -0
  499. data/dist/lib/Ice/Value.rb +93 -0
  500. data/dist/lib/Ice/Version.rb +78 -0
  501. data/dist/lib/Ice.rb +37 -0
  502. data/dist/lib/IceBox/ServiceManager.rb +104 -0
  503. data/dist/lib/IceBox.rb +3 -0
  504. data/dist/lib/IceGrid/Admin.rb +1208 -0
  505. data/dist/lib/IceGrid/Descriptor.rb +989 -0
  506. data/dist/lib/IceGrid/Exception.rb +145 -0
  507. data/dist/lib/IceGrid/FileParser.rb +41 -0
  508. data/dist/lib/IceGrid/Registry.rb +168 -0
  509. data/dist/lib/IceGrid/Session.rb +56 -0
  510. data/dist/lib/IceGrid/UserAccountMapper.rb +38 -0
  511. data/dist/lib/IceGrid.rb +9 -0
  512. data/dist/lib/IceStorm/IceStorm.rb +251 -0
  513. data/dist/lib/IceStorm/Metrics.rb +55 -0
  514. data/dist/lib/IceStorm.rb +4 -0
  515. data/extconf.rb +89 -0
  516. data/ice.gemspec +22 -17
  517. data/scripts/slice2rb +10 -0
  518. metadata +536 -712
  519. data/ICE_LICENSE +0 -48
  520. data/LICENSE +0 -340
  521. data/MCPP_LICENSE +0 -29
  522. data/bin/slice2rb +0 -12
  523. data/ext/Communicator.cpp +0 -792
  524. data/ext/Communicator.h +0 -20
  525. data/ext/Config.h +0 -143
  526. data/ext/Connection.cpp +0 -532
  527. data/ext/Connection.h +0 -24
  528. data/ext/Endpoint.cpp +0 -340
  529. data/ext/Endpoint.h +0 -22
  530. data/ext/ImplicitContext.cpp +0 -144
  531. data/ext/ImplicitContext.h +0 -20
  532. data/ext/Init.cpp +0 -49
  533. data/ext/Logger.cpp +0 -147
  534. data/ext/Logger.h +0 -23
  535. data/ext/Operation.cpp +0 -661
  536. data/ext/Operation.h +0 -31
  537. data/ext/Properties.cpp +0 -365
  538. data/ext/Properties.h +0 -20
  539. data/ext/Proxy.cpp +0 -1396
  540. data/ext/Proxy.h +0 -22
  541. data/ext/Slice.cpp +0 -205
  542. data/ext/Slice.h +0 -17
  543. data/ext/Types.cpp +0 -3325
  544. data/ext/Types.h +0 -595
  545. data/ext/Util.cpp +0 -812
  546. data/ext/Util.h +0 -586
  547. data/ext/ValueFactoryManager.cpp +0 -441
  548. data/ext/ValueFactoryManager.h +0 -95
  549. data/ext/extconf.rb +0 -97
  550. data/ext/ice/cpp/include/Ice/Application.h +0 -326
  551. data/ext/ice/cpp/include/Ice/AsyncResult.h +0 -155
  552. data/ext/ice/cpp/include/Ice/AsyncResultF.h +0 -23
  553. data/ext/ice/cpp/include/Ice/BatchRequestInterceptor.h +0 -75
  554. data/ext/ice/cpp/include/Ice/BatchRequestQueueF.h +0 -20
  555. data/ext/ice/cpp/include/Ice/Buffer.h +0 -154
  556. data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +0 -154
  557. data/ext/ice/cpp/include/Ice/Comparable.h +0 -205
  558. data/ext/ice/cpp/include/Ice/Config.h +0 -76
  559. data/ext/ice/cpp/include/Ice/ConnectionAsync.h +0 -302
  560. data/ext/ice/cpp/include/Ice/ConnectionIF.h +0 -38
  561. data/ext/ice/cpp/include/Ice/ConsoleUtil.h +0 -23
  562. data/ext/ice/cpp/include/Ice/DefaultValueFactory.h +0 -57
  563. data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +0 -41
  564. data/ext/ice/cpp/include/Ice/Dispatcher.h +0 -67
  565. data/ext/ice/cpp/include/Ice/DynamicLibrary.h +0 -102
  566. data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +0 -24
  567. data/ext/ice/cpp/include/Ice/Exception.h +0 -161
  568. data/ext/ice/cpp/include/Ice/ExceptionHelpers.h +0 -74
  569. data/ext/ice/cpp/include/Ice/FactoryTable.h +0 -73
  570. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +0 -84
  571. data/ext/ice/cpp/include/Ice/Format.h +0 -38
  572. data/ext/ice/cpp/include/Ice/Functional.h +0 -140
  573. data/ext/ice/cpp/include/Ice/GCObject.h +0 -76
  574. data/ext/ice/cpp/include/Ice/Handle.h +0 -182
  575. data/ext/ice/cpp/include/Ice/Ice.h +0 -55
  576. data/ext/ice/cpp/include/Ice/IconvStringConverter.h +0 -377
  577. data/ext/ice/cpp/include/Ice/Incoming.h +0 -225
  578. data/ext/ice/cpp/include/Ice/IncomingAsync.h +0 -186
  579. data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +0 -36
  580. data/ext/ice/cpp/include/Ice/Initialize.h +0 -957
  581. data/ext/ice/cpp/include/Ice/InputStream.h +0 -1514
  582. data/ext/ice/cpp/include/Ice/InstanceF.h +0 -20
  583. data/ext/ice/cpp/include/Ice/InterfaceByValue.h +0 -57
  584. data/ext/ice/cpp/include/Ice/LocalObject.h +0 -35
  585. data/ext/ice/cpp/include/Ice/LocalObjectF.h +0 -21
  586. data/ext/ice/cpp/include/Ice/LoggerUtil.h +0 -185
  587. data/ext/ice/cpp/include/Ice/MetricsAdminI.h +0 -715
  588. data/ext/ice/cpp/include/Ice/MetricsFunctional.h +0 -159
  589. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +0 -669
  590. data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +0 -86
  591. data/ext/ice/cpp/include/Ice/Object.h +0 -507
  592. data/ext/ice/cpp/include/Ice/ObjectF.h +0 -30
  593. data/ext/ice/cpp/include/Ice/ObserverHelper.h +0 -182
  594. data/ext/ice/cpp/include/Ice/Optional.h +0 -1114
  595. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +0 -856
  596. data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +0 -39
  597. data/ext/ice/cpp/include/Ice/OutputStream.h +0 -1092
  598. data/ext/ice/cpp/include/Ice/Protocol.h +0 -274
  599. data/ext/ice/cpp/include/Ice/Proxy.h +0 -5154
  600. data/ext/ice/cpp/include/Ice/ProxyF.h +0 -53
  601. data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +0 -21
  602. data/ext/ice/cpp/include/Ice/ProxyHandle.h +0 -318
  603. data/ext/ice/cpp/include/Ice/ReferenceF.h +0 -29
  604. data/ext/ice/cpp/include/Ice/RegisterPlugins.h +0 -127
  605. data/ext/ice/cpp/include/Ice/RequestHandlerF.h +0 -30
  606. data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +0 -25
  607. data/ext/ice/cpp/include/Ice/SHA1.h +0 -40
  608. data/ext/ice/cpp/include/Ice/ServantManagerF.h +0 -21
  609. data/ext/ice/cpp/include/Ice/Service.h +0 -379
  610. data/ext/ice/cpp/include/Ice/SliceChecksums.h +0 -33
  611. data/ext/ice/cpp/include/Ice/SlicedData.h +0 -172
  612. data/ext/ice/cpp/include/Ice/SlicedDataF.h +0 -40
  613. data/ext/ice/cpp/include/Ice/StreamHelpers.h +0 -1190
  614. data/ext/ice/cpp/include/Ice/StringConverter.h +0 -78
  615. data/ext/ice/cpp/include/Ice/ThreadPoolF.h +0 -23
  616. data/ext/ice/cpp/include/Ice/UUID.h +0 -19
  617. data/ext/ice/cpp/include/Ice/UniquePtr.h +0 -95
  618. data/ext/ice/cpp/include/Ice/UniqueRef.h +0 -97
  619. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +0 -88
  620. data/ext/ice/cpp/include/Ice/Value.h +0 -139
  621. data/ext/ice/cpp/include/Ice/ValueF.h +0 -21
  622. data/ext/ice/cpp/include/IceSSL/Config.h +0 -21
  623. data/ext/ice/cpp/include/IceSSL/IceSSL.h +0 -24
  624. data/ext/ice/cpp/include/IceSSL/OpenSSL.h +0 -147
  625. data/ext/ice/cpp/include/IceSSL/Plugin.h +0 -712
  626. data/ext/ice/cpp/include/IceSSL/SChannel.h +0 -72
  627. data/ext/ice/cpp/include/IceSSL/SecureTransport.h +0 -72
  628. data/ext/ice/cpp/include/IceSSL/UWP.h +0 -62
  629. data/ext/ice/cpp/include/IceUtil/Atomic.h +0 -179
  630. data/ext/ice/cpp/include/IceUtil/Cond.h +0 -317
  631. data/ext/ice/cpp/include/IceUtil/Config.h +0 -392
  632. data/ext/ice/cpp/include/IceUtil/ConsoleUtil.h +0 -92
  633. data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +0 -45
  634. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +0 -92
  635. data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +0 -44
  636. data/ext/ice/cpp/include/IceUtil/Exception.h +0 -394
  637. data/ext/ice/cpp/include/IceUtil/FileUtil.h +0 -140
  638. data/ext/ice/cpp/include/IceUtil/Functional.h +0 -389
  639. data/ext/ice/cpp/include/IceUtil/Handle.h +0 -261
  640. data/ext/ice/cpp/include/IceUtil/IceUtil.h +0 -40
  641. data/ext/ice/cpp/include/IceUtil/InputUtil.h +0 -42
  642. data/ext/ice/cpp/include/IceUtil/Iterator.h +0 -31
  643. data/ext/ice/cpp/include/IceUtil/Lock.h +0 -128
  644. data/ext/ice/cpp/include/IceUtil/Monitor.h +0 -243
  645. data/ext/ice/cpp/include/IceUtil/Mutex.h +0 -349
  646. data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +0 -23
  647. data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +0 -78
  648. data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +0 -77
  649. data/ext/ice/cpp/include/IceUtil/Optional.h +0 -433
  650. data/ext/ice/cpp/include/IceUtil/Options.h +0 -135
  651. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +0 -383
  652. data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +0 -14
  653. data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +0 -33
  654. data/ext/ice/cpp/include/IceUtil/Random.h +0 -55
  655. data/ext/ice/cpp/include/IceUtil/RecMutex.h +0 -107
  656. data/ext/ice/cpp/include/IceUtil/ResourceConfig.h +0 -37
  657. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +0 -40
  658. data/ext/ice/cpp/include/IceUtil/ScopedArray.h +0 -98
  659. data/ext/ice/cpp/include/IceUtil/Shared.h +0 -127
  660. data/ext/ice/cpp/include/IceUtil/StopWatch.h +0 -49
  661. data/ext/ice/cpp/include/IceUtil/StringConverter.h +0 -195
  662. data/ext/ice/cpp/include/IceUtil/StringUtil.h +0 -97
  663. data/ext/ice/cpp/include/IceUtil/Thread.h +0 -160
  664. data/ext/ice/cpp/include/IceUtil/ThreadException.h +0 -94
  665. data/ext/ice/cpp/include/IceUtil/Time.h +0 -205
  666. data/ext/ice/cpp/include/IceUtil/Timer.h +0 -144
  667. data/ext/ice/cpp/include/IceUtil/UUID.h +0 -21
  668. data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +0 -37
  669. data/ext/ice/cpp/include/generated/Ice/BuiltinSequences.h +0 -170
  670. data/ext/ice/cpp/include/generated/Ice/Communicator.h +0 -1162
  671. data/ext/ice/cpp/include/generated/Ice/CommunicatorF.h +0 -101
  672. data/ext/ice/cpp/include/generated/Ice/Connection.h +0 -1703
  673. data/ext/ice/cpp/include/generated/Ice/ConnectionF.h +0 -119
  674. data/ext/ice/cpp/include/generated/Ice/Current.h +0 -322
  675. data/ext/ice/cpp/include/generated/Ice/Endpoint.h +0 -979
  676. data/ext/ice/cpp/include/generated/Ice/EndpointF.h +0 -166
  677. data/ext/ice/cpp/include/generated/Ice/EndpointTypes.h +0 -118
  678. data/ext/ice/cpp/include/generated/Ice/FacetMap.h +0 -80
  679. data/ext/ice/cpp/include/generated/Ice/Identity.h +0 -264
  680. data/ext/ice/cpp/include/generated/Ice/ImplicitContext.h +0 -284
  681. data/ext/ice/cpp/include/generated/Ice/ImplicitContextF.h +0 -101
  682. data/ext/ice/cpp/include/generated/Ice/Instrumentation.h +0 -1203
  683. data/ext/ice/cpp/include/generated/Ice/InstrumentationF.h +0 -128
  684. data/ext/ice/cpp/include/generated/Ice/LocalException.h +0 -7437
  685. data/ext/ice/cpp/include/generated/Ice/Locator.h +0 -3898
  686. data/ext/ice/cpp/include/generated/Ice/LocatorF.h +0 -147
  687. data/ext/ice/cpp/include/generated/Ice/Logger.h +0 -237
  688. data/ext/ice/cpp/include/generated/Ice/LoggerF.h +0 -101
  689. data/ext/ice/cpp/include/generated/Ice/Metrics.h +0 -4769
  690. data/ext/ice/cpp/include/generated/Ice/ObjectAdapter.h +0 -1181
  691. data/ext/ice/cpp/include/generated/Ice/ObjectAdapterF.h +0 -101
  692. data/ext/ice/cpp/include/generated/Ice/ObjectFactory.h +0 -203
  693. data/ext/ice/cpp/include/generated/Ice/Plugin.h +0 -318
  694. data/ext/ice/cpp/include/generated/Ice/PluginF.h +0 -110
  695. data/ext/ice/cpp/include/generated/Ice/Process.h +0 -977
  696. data/ext/ice/cpp/include/generated/Ice/ProcessF.h +0 -125
  697. data/ext/ice/cpp/include/generated/Ice/Properties.h +0 -452
  698. data/ext/ice/cpp/include/generated/Ice/PropertiesAdmin.h +0 -1366
  699. data/ext/ice/cpp/include/generated/Ice/PropertiesF.h +0 -134
  700. data/ext/ice/cpp/include/generated/Ice/RemoteLogger.h +0 -2707
  701. data/ext/ice/cpp/include/generated/Ice/Router.h +0 -1850
  702. data/ext/ice/cpp/include/generated/Ice/RouterF.h +0 -125
  703. data/ext/ice/cpp/include/generated/Ice/ServantLocator.h +0 -305
  704. data/ext/ice/cpp/include/generated/Ice/ServantLocatorF.h +0 -101
  705. data/ext/ice/cpp/include/generated/Ice/SliceChecksumDict.h +0 -84
  706. data/ext/ice/cpp/include/generated/Ice/ValueFactory.h +0 -330
  707. data/ext/ice/cpp/include/generated/Ice/Version.h +0 -357
  708. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +0 -228
  709. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +0 -101
  710. data/ext/ice/cpp/include/generated/IceSSL/EndpointInfo.h +0 -186
  711. data/ext/ice/cpp/src/Ice/ACM.cpp +0 -380
  712. data/ext/ice/cpp/src/Ice/ACM.h +0 -119
  713. data/ext/ice/cpp/src/Ice/ACMF.h +0 -30
  714. data/ext/ice/cpp/src/Ice/Acceptor.cpp +0 -16
  715. data/ext/ice/cpp/src/Ice/Acceptor.h +0 -37
  716. data/ext/ice/cpp/src/Ice/AcceptorF.h +0 -25
  717. data/ext/ice/cpp/src/Ice/ArgVector.cpp +0 -59
  718. data/ext/ice/cpp/src/Ice/ArgVector.h +0 -36
  719. data/ext/ice/cpp/src/Ice/AsyncResult.cpp +0 -70
  720. data/ext/ice/cpp/src/Ice/Base64.cpp +0 -263
  721. data/ext/ice/cpp/src/Ice/Base64.h +0 -31
  722. data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +0 -250
  723. data/ext/ice/cpp/src/Ice/BatchRequestQueue.h +0 -59
  724. data/ext/ice/cpp/src/Ice/Buffer.cpp +0 -155
  725. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +0 -49
  726. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +0 -407
  727. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +0 -87
  728. data/ext/ice/cpp/src/Ice/Communicator.cpp +0 -79
  729. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +0 -61
  730. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +0 -586
  731. data/ext/ice/cpp/src/Ice/CommunicatorI.h +0 -167
  732. data/ext/ice/cpp/src/Ice/Cond.cpp +0 -381
  733. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +0 -348
  734. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +0 -72
  735. data/ext/ice/cpp/src/Ice/ConnectRequestHandlerF.h +0 -24
  736. data/ext/ice/cpp/src/Ice/Connection.cpp +0 -155
  737. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +0 -61
  738. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +0 -1972
  739. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +0 -264
  740. data/ext/ice/cpp/src/Ice/ConnectionFactoryF.h +0 -30
  741. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +0 -3670
  742. data/ext/ice/cpp/src/Ice/ConnectionI.h +0 -389
  743. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +0 -73
  744. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +0 -41
  745. data/ext/ice/cpp/src/Ice/Connector.cpp +0 -16
  746. data/ext/ice/cpp/src/Ice/Connector.h +0 -32
  747. data/ext/ice/cpp/src/Ice/ConnectorF.h +0 -21
  748. data/ext/ice/cpp/src/Ice/CountDownLatch.cpp +0 -171
  749. data/ext/ice/cpp/src/Ice/Current.cpp +0 -62
  750. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +0 -159
  751. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +0 -52
  752. data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +0 -21
  753. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +0 -37
  754. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +0 -284
  755. data/ext/ice/cpp/src/Ice/Endpoint.cpp +0 -147
  756. data/ext/ice/cpp/src/Ice/EndpointF.cpp +0 -61
  757. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +0 -189
  758. data/ext/ice/cpp/src/Ice/EndpointFactory.h +0 -117
  759. data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +0 -21
  760. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +0 -213
  761. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +0 -47
  762. data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +0 -21
  763. data/ext/ice/cpp/src/Ice/EndpointI.cpp +0 -98
  764. data/ext/ice/cpp/src/Ice/EndpointI.h +0 -218
  765. data/ext/ice/cpp/src/Ice/EndpointIF.h +0 -49
  766. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +0 -51
  767. data/ext/ice/cpp/src/Ice/EventHandler.cpp +0 -32
  768. data/ext/ice/cpp/src/Ice/EventHandler.h +0 -81
  769. data/ext/ice/cpp/src/Ice/EventHandlerF.h +0 -24
  770. data/ext/ice/cpp/src/Ice/Exception.cpp +0 -818
  771. data/ext/ice/cpp/src/Ice/FacetMap.cpp +0 -49
  772. data/ext/ice/cpp/src/Ice/FactoryTable.cpp +0 -162
  773. data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +0 -88
  774. data/ext/ice/cpp/src/Ice/GCObject.cpp +0 -442
  775. data/ext/ice/cpp/src/Ice/HashUtil.h +0 -53
  776. data/ext/ice/cpp/src/Ice/HttpParser.cpp +0 -684
  777. data/ext/ice/cpp/src/Ice/HttpParser.h +0 -117
  778. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +0 -710
  779. data/ext/ice/cpp/src/Ice/IPEndpointI.h +0 -152
  780. data/ext/ice/cpp/src/Ice/IPEndpointIF.h +0 -28
  781. data/ext/ice/cpp/src/Ice/IconvStringConverter.cpp +0 -51
  782. data/ext/ice/cpp/src/Ice/Identity.cpp +0 -57
  783. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +0 -75
  784. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +0 -61
  785. data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +0 -655
  786. data/ext/ice/cpp/src/Ice/ImplicitContextI.h +0 -48
  787. data/ext/ice/cpp/src/Ice/Incoming.cpp +0 -795
  788. data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +0 -230
  789. data/ext/ice/cpp/src/Ice/IncomingRequest.h +0 -33
  790. data/ext/ice/cpp/src/Ice/Initialize.cpp +0 -654
  791. data/ext/ice/cpp/src/Ice/InputStream.cpp +0 -2741
  792. data/ext/ice/cpp/src/Ice/Instance.cpp +0 -1967
  793. data/ext/ice/cpp/src/Ice/Instance.h +0 -235
  794. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +0 -188
  795. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +0 -66
  796. data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +0 -1094
  797. data/ext/ice/cpp/src/Ice/InstrumentationI.h +0 -256
  798. data/ext/ice/cpp/src/Ice/LocalException.cpp +0 -3262
  799. data/ext/ice/cpp/src/Ice/LocalObject.cpp +0 -23
  800. data/ext/ice/cpp/src/Ice/Locator.cpp +0 -2042
  801. data/ext/ice/cpp/src/Ice/LocatorF.cpp +0 -63
  802. data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +0 -889
  803. data/ext/ice/cpp/src/Ice/LocatorInfo.h +0 -189
  804. data/ext/ice/cpp/src/Ice/LocatorInfoF.h +0 -29
  805. data/ext/ice/cpp/src/Ice/Logger.cpp +0 -73
  806. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +0 -956
  807. data/ext/ice/cpp/src/Ice/LoggerAdminI.h +0 -41
  808. data/ext/ice/cpp/src/Ice/LoggerF.cpp +0 -61
  809. data/ext/ice/cpp/src/Ice/LoggerI.cpp +0 -259
  810. data/ext/ice/cpp/src/Ice/LoggerI.h +0 -52
  811. data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +0 -100
  812. data/ext/ice/cpp/src/Ice/Metrics.cpp +0 -2352
  813. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +0 -694
  814. data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +0 -8
  815. data/ext/ice/cpp/src/Ice/Network.cpp +0 -2249
  816. data/ext/ice/cpp/src/Ice/Network.h +0 -289
  817. data/ext/ice/cpp/src/Ice/NetworkF.h +0 -19
  818. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +0 -311
  819. data/ext/ice/cpp/src/Ice/NetworkProxy.h +0 -72
  820. data/ext/ice/cpp/src/Ice/NetworkProxyF.h +0 -21
  821. data/ext/ice/cpp/src/Ice/OSLogLoggerI.cpp +0 -57
  822. data/ext/ice/cpp/src/Ice/OSLogLoggerI.h +0 -40
  823. data/ext/ice/cpp/src/Ice/Object.cpp +0 -435
  824. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +0 -79
  825. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +0 -61
  826. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +0 -291
  827. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +0 -53
  828. data/ext/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +0 -25
  829. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +0 -1530
  830. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +0 -159
  831. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +0 -75
  832. data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +0 -56
  833. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +0 -408
  834. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +0 -74
  835. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +0 -1322
  836. data/ext/ice/cpp/src/Ice/OutputStream.cpp +0 -1367
  837. data/ext/ice/cpp/src/Ice/Plugin.cpp +0 -87
  838. data/ext/ice/cpp/src/Ice/PluginF.cpp +0 -61
  839. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +0 -503
  840. data/ext/ice/cpp/src/Ice/PluginManagerI.h +0 -61
  841. data/ext/ice/cpp/src/Ice/Process.cpp +0 -471
  842. data/ext/ice/cpp/src/Ice/ProcessF.cpp +0 -63
  843. data/ext/ice/cpp/src/Ice/Properties.cpp +0 -78
  844. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +0 -603
  845. data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +0 -265
  846. data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +0 -64
  847. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +0 -63
  848. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +0 -739
  849. data/ext/ice/cpp/src/Ice/PropertiesI.h +0 -70
  850. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +0 -1429
  851. data/ext/ice/cpp/src/Ice/PropertyNames.h +0 -78
  852. data/ext/ice/cpp/src/Ice/Protocol.cpp +0 -124
  853. data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -131
  854. data/ext/ice/cpp/src/Ice/ProtocolInstance.h +0 -93
  855. data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +0 -21
  856. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +0 -51
  857. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +0 -64
  858. data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +0 -21
  859. data/ext/ice/cpp/src/Ice/Proxy.cpp +0 -1601
  860. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +0 -300
  861. data/ext/ice/cpp/src/Ice/ProxyFactory.h +0 -57
  862. data/ext/ice/cpp/src/Ice/Reference.cpp +0 -2046
  863. data/ext/ice/cpp/src/Ice/Reference.h +0 -323
  864. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +0 -888
  865. data/ext/ice/cpp/src/Ice/ReferenceFactory.h +0 -76
  866. data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +0 -19
  867. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.cpp +0 -38
  868. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.h +0 -20
  869. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +0 -1171
  870. data/ext/ice/cpp/src/Ice/ReplyStatus.h +0 -24
  871. data/ext/ice/cpp/src/Ice/RequestHandler.cpp +0 -37
  872. data/ext/ice/cpp/src/Ice/RequestHandler.h +0 -78
  873. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +0 -77
  874. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +0 -37
  875. data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +0 -12
  876. data/ext/ice/cpp/src/Ice/ResponseHandler.h +0 -43
  877. data/ext/ice/cpp/src/Ice/RetryQueue.cpp +0 -157
  878. data/ext/ice/cpp/src/Ice/RetryQueue.h +0 -66
  879. data/ext/ice/cpp/src/Ice/RetryQueueF.h +0 -19
  880. data/ext/ice/cpp/src/Ice/Router.cpp +0 -977
  881. data/ext/ice/cpp/src/Ice/RouterF.cpp +0 -63
  882. data/ext/ice/cpp/src/Ice/RouterInfo.cpp +0 -379
  883. data/ext/ice/cpp/src/Ice/RouterInfo.h +0 -152
  884. data/ext/ice/cpp/src/Ice/RouterInfoF.h +0 -25
  885. data/ext/ice/cpp/src/Ice/SHA1.cpp +0 -169
  886. data/ext/ice/cpp/src/Ice/Selector.cpp +0 -1525
  887. data/ext/ice/cpp/src/Ice/Selector.h +0 -292
  888. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +0 -75
  889. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +0 -61
  890. data/ext/ice/cpp/src/Ice/ServantManager.cpp +0 -480
  891. data/ext/ice/cpp/src/Ice/ServantManager.h +0 -69
  892. data/ext/ice/cpp/src/Ice/SharedContext.h +0 -46
  893. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +0 -49
  894. data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +0 -75
  895. data/ext/ice/cpp/src/Ice/SlicedData.cpp +0 -127
  896. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +0 -519
  897. data/ext/ice/cpp/src/Ice/StreamSocket.h +0 -85
  898. data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +0 -192
  899. data/ext/ice/cpp/src/Ice/StringUtil.h +0 -30
  900. data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +0 -166
  901. data/ext/ice/cpp/src/Ice/SysLoggerI.h +0 -37
  902. data/ext/ice/cpp/src/Ice/SystemdJournalI.cpp +0 -66
  903. data/ext/ice/cpp/src/Ice/SystemdJournalI.h +0 -39
  904. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +0 -234
  905. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +0 -61
  906. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +0 -127
  907. data/ext/ice/cpp/src/Ice/TcpConnector.h +0 -45
  908. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +0 -385
  909. data/ext/ice/cpp/src/Ice/TcpEndpointI.h +0 -90
  910. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +0 -135
  911. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +0 -58
  912. data/ext/ice/cpp/src/Ice/Thread.cpp +0 -569
  913. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +0 -1292
  914. data/ext/ice/cpp/src/Ice/ThreadPool.h +0 -393
  915. data/ext/ice/cpp/src/Ice/Timer.cpp +0 -263
  916. data/ext/ice/cpp/src/Ice/TraceLevels.cpp +0 -38
  917. data/ext/ice/cpp/src/Ice/TraceLevels.h +0 -45
  918. data/ext/ice/cpp/src/Ice/TraceLevelsF.h +0 -21
  919. data/ext/ice/cpp/src/Ice/TraceUtil.cpp +0 -478
  920. data/ext/ice/cpp/src/Ice/TraceUtil.h +0 -30
  921. data/ext/ice/cpp/src/Ice/Transceiver.cpp +0 -18
  922. data/ext/ice/cpp/src/Ice/Transceiver.h +0 -49
  923. data/ext/ice/cpp/src/Ice/TransceiverF.h +0 -33
  924. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +0 -131
  925. data/ext/ice/cpp/src/Ice/UdpConnector.h +0 -45
  926. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +0 -515
  927. data/ext/ice/cpp/src/Ice/UdpEndpointI.h +0 -95
  928. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +0 -806
  929. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +0 -96
  930. data/ext/ice/cpp/src/Ice/Value.cpp +0 -76
  931. data/ext/ice/cpp/src/Ice/ValueFactory.cpp +0 -83
  932. data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +0 -61
  933. data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.h +0 -37
  934. data/ext/ice/cpp/src/Ice/Version.cpp +0 -57
  935. data/ext/ice/cpp/src/Ice/VirtualShared.h +0 -38
  936. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +0 -92
  937. data/ext/ice/cpp/src/Ice/WSAcceptor.h +0 -52
  938. data/ext/ice/cpp/src/Ice/WSConnector.cpp +0 -102
  939. data/ext/ice/cpp/src/Ice/WSConnector.h +0 -43
  940. data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +0 -508
  941. data/ext/ice/cpp/src/Ice/WSEndpoint.h +0 -93
  942. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +0 -1704
  943. data/ext/ice/cpp/src/Ice/WSTransceiver.h +0 -141
  944. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +0 -915
  945. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +0 -1889
  946. data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +0 -265
  947. data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +0 -109
  948. data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +0 -608
  949. data/ext/ice/cpp/src/IceDiscovery/LookupI.h +0 -228
  950. data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +0 -176
  951. data/ext/ice/cpp/src/IceDiscovery/PluginI.h +0 -36
  952. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +0 -730
  953. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +0 -1197
  954. data/ext/ice/cpp/src/IceLocatorDiscovery/Plugin.h +0 -47
  955. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +0 -1048
  956. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +0 -105
  957. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +0 -52
  958. data/ext/ice/cpp/src/IceSSL/CertificateI.cpp +0 -301
  959. data/ext/ice/cpp/src/IceSSL/CertificateI.h +0 -64
  960. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +0 -75
  961. data/ext/ice/cpp/src/IceSSL/ConnectionInfoF.cpp +0 -61
  962. data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +0 -102
  963. data/ext/ice/cpp/src/IceSSL/ConnectorI.h +0 -44
  964. data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +0 -372
  965. data/ext/ice/cpp/src/IceSSL/EndpointI.h +0 -100
  966. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +0 -75
  967. data/ext/ice/cpp/src/IceSSL/Instance.cpp +0 -28
  968. data/ext/ice/cpp/src/IceSSL/Instance.h +0 -37
  969. data/ext/ice/cpp/src/IceSSL/InstanceF.h +0 -33
  970. data/ext/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +0 -688
  971. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +0 -1147
  972. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -59
  973. data/ext/ice/cpp/src/IceSSL/OpenSSLEngineF.h +0 -27
  974. data/ext/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +0 -127
  975. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +0 -1092
  976. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +0 -90
  977. data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +0 -288
  978. data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.h +0 -58
  979. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +0 -246
  980. data/ext/ice/cpp/src/IceSSL/PluginI.h +0 -67
  981. data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +0 -490
  982. data/ext/ice/cpp/src/IceSSL/RFC2253.h +0 -62
  983. data/ext/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +0 -721
  984. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -1283
  985. data/ext/ice/cpp/src/IceSSL/SChannelEngine.h +0 -123
  986. data/ext/ice/cpp/src/IceSSL/SChannelEngineF.h +0 -31
  987. data/ext/ice/cpp/src/IceSSL/SChannelPluginI.cpp +0 -73
  988. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +0 -1174
  989. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +0 -133
  990. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +0 -313
  991. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +0 -100
  992. data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +0 -21
  993. data/ext/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +0 -999
  994. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +0 -1308
  995. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.h +0 -59
  996. data/ext/ice/cpp/src/IceSSL/SecureTransportEngineF.h +0 -29
  997. data/ext/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +0 -75
  998. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +0 -719
  999. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +0 -92
  1000. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +0 -868
  1001. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.h +0 -45
  1002. data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +0 -236
  1003. data/ext/ice/cpp/src/IceSSL/TrustManager.h +0 -46
  1004. data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +0 -21
  1005. data/ext/ice/cpp/src/IceSSL/UWPCertificateI.cpp +0 -266
  1006. data/ext/ice/cpp/src/IceSSL/UWPEngine.cpp +0 -338
  1007. data/ext/ice/cpp/src/IceSSL/UWPEngine.h +0 -41
  1008. data/ext/ice/cpp/src/IceSSL/UWPEngineF.h +0 -26
  1009. data/ext/ice/cpp/src/IceSSL/UWPPluginI.cpp +0 -89
  1010. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.cpp +0 -383
  1011. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.h +0 -71
  1012. data/ext/ice/cpp/src/IceSSL/Util.cpp +0 -192
  1013. data/ext/ice/cpp/src/IceSSL/Util.h +0 -99
  1014. data/ext/ice/cpp/src/IceUtil/ConsoleUtil.cpp +0 -157
  1015. data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +0 -472
  1016. data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +0 -147
  1017. data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +0 -259
  1018. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +0 -471
  1019. data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +0 -36
  1020. data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +0 -19
  1021. data/ext/ice/cpp/src/IceUtil/Options.cpp +0 -1051
  1022. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +0 -609
  1023. data/ext/ice/cpp/src/IceUtil/Random.cpp +0 -180
  1024. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +0 -238
  1025. data/ext/ice/cpp/src/IceUtil/Shared.cpp +0 -71
  1026. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +0 -690
  1027. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +0 -1135
  1028. data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +0 -130
  1029. data/ext/ice/cpp/src/IceUtil/Time.cpp +0 -307
  1030. data/ext/ice/cpp/src/IceUtil/UUID.cpp +0 -165
  1031. data/ext/ice/cpp/src/IceUtil/Unicode.cpp +0 -183
  1032. data/ext/ice/cpp/src/IceUtil/Unicode.h +0 -43
  1033. data/ext/ice/cpp/src/IceUtil/UtilException.cpp +0 -839
  1034. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +0 -1810
  1035. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.h +0 -72
  1036. data/ext/ice/cpp/src/Slice/Checksum.cpp +0 -447
  1037. data/ext/ice/cpp/src/Slice/Checksum.h +0 -21
  1038. data/ext/ice/cpp/src/Slice/FileTracker.cpp +0 -146
  1039. data/ext/ice/cpp/src/Slice/FileTracker.h +0 -66
  1040. data/ext/ice/cpp/src/Slice/Grammar.cpp +0 -4793
  1041. data/ext/ice/cpp/src/Slice/Grammar.h +0 -118
  1042. data/ext/ice/cpp/src/Slice/GrammarUtil.h +0 -228
  1043. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +0 -5176
  1044. data/ext/ice/cpp/src/Slice/JavaUtil.h +0 -407
  1045. data/ext/ice/cpp/src/Slice/MD5.cpp +0 -52
  1046. data/ext/ice/cpp/src/Slice/MD5.h +0 -39
  1047. data/ext/ice/cpp/src/Slice/MD5I.cpp +0 -393
  1048. data/ext/ice/cpp/src/Slice/MD5I.h +0 -91
  1049. data/ext/ice/cpp/src/Slice/PHPUtil.cpp +0 -157
  1050. data/ext/ice/cpp/src/Slice/PHPUtil.h +0 -36
  1051. data/ext/ice/cpp/src/Slice/Parser.cpp +0 -7058
  1052. data/ext/ice/cpp/src/Slice/Parser.h +0 -1174
  1053. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +0 -797
  1054. data/ext/ice/cpp/src/Slice/Preprocessor.h +0 -60
  1055. data/ext/ice/cpp/src/Slice/Python.cpp +0 -830
  1056. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +0 -3439
  1057. data/ext/ice/cpp/src/Slice/PythonUtil.h +0 -70
  1058. data/ext/ice/cpp/src/Slice/Ruby.cpp +0 -350
  1059. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +0 -1571
  1060. data/ext/ice/cpp/src/Slice/RubyUtil.h +0 -49
  1061. data/ext/ice/cpp/src/Slice/Scanner.cpp +0 -2807
  1062. data/ext/ice/cpp/src/Slice/SliceUtil.cpp +0 -424
  1063. data/ext/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -456
  1064. data/ext/ice/cpp/src/Slice/Util.h +0 -50
  1065. data/ext/ice/mcpp/CMakeLists.txt +0 -80
  1066. data/ext/ice/mcpp/LICENSE +0 -29
  1067. data/ext/ice/mcpp/Makefile +0 -63
  1068. data/ext/ice/mcpp/README.md +0 -32
  1069. data/ext/ice/mcpp/internal.H +0 -530
  1070. data/ext/ice/mcpp/mcpp.gyp +0 -88
  1071. data/ext/ice/mcpp/system.c +0 -2737
  1072. data/lib/Glacier2/Metrics.rb +0 -56
  1073. data/lib/Glacier2/PermissionsVerifier.rb +0 -93
  1074. data/lib/Glacier2/PermissionsVerifierF.rb +0 -30
  1075. data/lib/Glacier2/Router.rb +0 -95
  1076. data/lib/Glacier2/RouterF.rb +0 -25
  1077. data/lib/Glacier2/SSLInfo.rb +0 -72
  1078. data/lib/Glacier2/Session.rb +0 -247
  1079. data/lib/Glacier2.rb +0 -7
  1080. data/lib/Ice/BuiltinSequences.rb +0 -60
  1081. data/lib/Ice/Communicator.rb +0 -87
  1082. data/lib/Ice/CommunicatorF.rb +0 -24
  1083. data/lib/Ice/Connection.rb +0 -413
  1084. data/lib/Ice/ConnectionF.rb +0 -32
  1085. data/lib/Ice/Current.rb +0 -141
  1086. data/lib/Ice/Endpoint.rb +0 -187
  1087. data/lib/Ice/EndpointF.rb +0 -48
  1088. data/lib/Ice/EndpointTypes.rb +0 -69
  1089. data/lib/Ice/FacetMap.rb +0 -24
  1090. data/lib/Ice/Identity.rb +0 -63
  1091. data/lib/Ice/ImplicitContext.rb +0 -26
  1092. data/lib/Ice/ImplicitContextF.rb +0 -24
  1093. data/lib/Ice/Instrumentation.rb +0 -169
  1094. data/lib/Ice/InstrumentationF.rb +0 -31
  1095. data/lib/Ice/LocalException.rb +0 -1031
  1096. data/lib/Ice/Locator.rb +0 -196
  1097. data/lib/Ice/LocatorF.rb +0 -30
  1098. data/lib/Ice/Logger.rb +0 -24
  1099. data/lib/Ice/LoggerF.rb +0 -24
  1100. data/lib/Ice/Metrics.rb +0 -337
  1101. data/lib/Ice/ObjectAdapter.rb +0 -29
  1102. data/lib/Ice/ObjectAdapterF.rb +0 -24
  1103. data/lib/Ice/ObjectFactory.rb +0 -24
  1104. data/lib/Ice/Plugin.rb +0 -30
  1105. data/lib/Ice/PluginF.rb +0 -28
  1106. data/lib/Ice/Process.rb +0 -53
  1107. data/lib/Ice/ProcessF.rb +0 -25
  1108. data/lib/Ice/Properties.rb +0 -25
  1109. data/lib/Ice/PropertiesAdmin.rb +0 -63
  1110. data/lib/Ice/PropertiesF.rb +0 -29
  1111. data/lib/Ice/RemoteLogger.rb +0 -207
  1112. data/lib/Ice/Router.rb +0 -87
  1113. data/lib/Ice/RouterF.rb +0 -25
  1114. data/lib/Ice/ServantLocator.rb +0 -26
  1115. data/lib/Ice/ServantLocatorF.rb +0 -24
  1116. data/lib/Ice/SliceChecksumDict.rb +0 -24
  1117. data/lib/Ice/ValueFactory.rb +0 -28
  1118. data/lib/Ice/Version.rb +0 -90
  1119. data/lib/Ice.rb +0 -673
  1120. data/lib/IceBox/IceBox.rb +0 -164
  1121. data/lib/IceBox.rb +0 -5
  1122. data/lib/IceGrid/Admin.rb +0 -1196
  1123. data/lib/IceGrid/Descriptor.rb +0 -1034
  1124. data/lib/IceGrid/Exception.rb +0 -376
  1125. data/lib/IceGrid/FileParser.rb +0 -65
  1126. data/lib/IceGrid/PluginFacade.rb +0 -35
  1127. data/lib/IceGrid/Registry.rb +0 -209
  1128. data/lib/IceGrid/Session.rb +0 -71
  1129. data/lib/IceGrid/UserAccountMapper.rb +0 -61
  1130. data/lib/IceGrid.rb +0 -9
  1131. data/lib/IcePatch2/FileInfo.rb +0 -115
  1132. data/lib/IcePatch2/FileServer.rb +0 -123
  1133. data/lib/IcePatch2.rb +0 -5
  1134. data/lib/IceStorm/IceStorm.rb +0 -332
  1135. data/lib/IceStorm/Metrics.rb +0 -73
  1136. data/lib/IceStorm.rb +0 -6
  1137. data/slice/Glacier2/Metrics.ice +0 -88
  1138. data/slice/Glacier2/PermissionsVerifier.ice +0 -111
  1139. data/slice/Glacier2/PermissionsVerifierF.ice +0 -30
  1140. data/slice/Glacier2/Router.ice +0 -186
  1141. data/slice/Glacier2/RouterF.ice +0 -29
  1142. data/slice/Glacier2/SSLInfo.ice +0 -59
  1143. data/slice/Glacier2/Session.ice +0 -274
  1144. data/slice/Ice/BuiltinSequences.ice +0 -59
  1145. data/slice/Ice/Communicator.ice +0 -676
  1146. data/slice/Ice/CommunicatorF.ice +0 -31
  1147. data/slice/Ice/Connection.ice +0 -516
  1148. data/slice/Ice/ConnectionF.ice +0 -33
  1149. data/slice/Ice/Current.ice +0 -170
  1150. data/slice/Ice/Endpoint.ice +0 -291
  1151. data/slice/Ice/EndpointF.ice +0 -43
  1152. data/slice/Ice/EndpointTypes.ice +0 -48
  1153. data/slice/Ice/FacetMap.ice +0 -36
  1154. data/slice/Ice/Identity.ice +0 -75
  1155. data/slice/Ice/ImplicitContext.ice +0 -119
  1156. data/slice/Ice/ImplicitContextF.ice +0 -30
  1157. data/slice/Ice/Instrumentation.ice +0 -509
  1158. data/slice/Ice/InstrumentationF.ice +0 -38
  1159. data/slice/Ice/LocalException.ice +0 -1040
  1160. data/slice/Ice/Locator.ice +0 -239
  1161. data/slice/Ice/LocatorF.ice +0 -32
  1162. data/slice/Ice/Logger.ice +0 -99
  1163. data/slice/Ice/LoggerF.ice +0 -31
  1164. data/slice/Ice/Metrics.ice +0 -436
  1165. data/slice/Ice/ObjectAdapter.ice +0 -710
  1166. data/slice/Ice/ObjectAdapterF.ice +0 -31
  1167. data/slice/Ice/ObjectFactory.ice +0 -71
  1168. data/slice/Ice/Plugin.ice +0 -131
  1169. data/slice/Ice/PluginF.ice +0 -36
  1170. data/slice/Ice/Process.ice +0 -64
  1171. data/slice/Ice/ProcessF.ice +0 -31
  1172. data/slice/Ice/Properties.ice +0 -244
  1173. data/slice/Ice/PropertiesAdmin.ice +0 -87
  1174. data/slice/Ice/PropertiesF.ice +0 -32
  1175. data/slice/Ice/RemoteLogger.ice +0 -226
  1176. data/slice/Ice/Router.ice +0 -103
  1177. data/slice/Ice/RouterF.ice +0 -31
  1178. data/slice/Ice/ServantLocator.ice +0 -136
  1179. data/slice/Ice/ServantLocatorF.ice +0 -31
  1180. data/slice/Ice/SliceChecksumDict.ice +0 -36
  1181. data/slice/Ice/ValueFactory.ice +0 -133
  1182. data/slice/Ice/Version.ice +0 -51
  1183. data/slice/IceBT/ConnectionInfo.ice +0 -59
  1184. data/slice/IceBT/EndpointInfo.ice +0 -57
  1185. data/slice/IceBT/Types.ice +0 -45
  1186. data/slice/IceBox/IceBox.ice +0 -216
  1187. data/slice/IceDiscovery/IceDiscovery.ice +0 -98
  1188. data/slice/IceGrid/Admin.ice +0 -1957
  1189. data/slice/IceGrid/Descriptor.ice +0 -1094
  1190. data/slice/IceGrid/Exception.ice +0 -396
  1191. data/slice/IceGrid/FileParser.ice +0 -72
  1192. data/slice/IceGrid/PluginFacade.ice +0 -329
  1193. data/slice/IceGrid/Registry.ice +0 -269
  1194. data/slice/IceGrid/Session.ice +0 -128
  1195. data/slice/IceGrid/UserAccountMapper.ice +0 -69
  1196. data/slice/IceIAP/ConnectionInfo.ice +0 -74
  1197. data/slice/IceIAP/EndpointInfo.ice +0 -68
  1198. data/slice/IceLocatorDiscovery/IceLocatorDiscovery.ice +0 -83
  1199. data/slice/IcePatch2/FileInfo.ice +0 -85
  1200. data/slice/IcePatch2/FileServer.ice +0 -191
  1201. data/slice/IceSSL/ConnectionInfo.ice +0 -54
  1202. data/slice/IceSSL/ConnectionInfoF.ice +0 -31
  1203. data/slice/IceSSL/EndpointInfo.ice +0 -45
  1204. data/slice/IceStorm/IceStorm.ice +0 -414
  1205. data/slice/IceStorm/Metrics.ice +0 -83
  1206. /data/{ext → dist}/ice/mcpp/config.h +0 -0
  1207. /data/{ext → dist}/ice/mcpp/configed.H +0 -0
  1208. /data/{ext → dist}/ice/mcpp/directive.c +0 -0
  1209. /data/{ext → dist}/ice/mcpp/eval.c +0 -0
  1210. /data/{ext → dist}/ice/mcpp/expand.c +0 -0
  1211. /data/{ext → dist}/ice/mcpp/mbchar.c +0 -0
  1212. /data/{ext → dist}/ice/mcpp/mcpp_lib.h +0 -0
  1213. /data/{ext/ice/mcpp/main.c → dist/ice/mcpp/mcpp_main.c} +0 -0
  1214. /data/{ext → dist}/ice/mcpp/mcpp_out.h +0 -0
  1215. /data/{ext → dist}/ice/mcpp/support.c +0 -0
  1216. /data/{ext → dist}/ice/mcpp/system.H +0 -0
@@ -1,3670 +0,0 @@
1
- //
2
- // Copyright (c) ZeroC, Inc. All rights reserved.
3
- //
4
-
5
- #include <IceUtil/DisableWarnings.h>
6
- #include <Ice/ConnectionI.h>
7
- #include <Ice/Instance.h>
8
- #include <Ice/LoggerUtil.h>
9
- #include <Ice/Properties.h>
10
- #include <Ice/TraceUtil.h>
11
- #include <Ice/TraceLevels.h>
12
- #include <Ice/DefaultsAndOverrides.h>
13
- #include <Ice/Transceiver.h>
14
- #include <Ice/ThreadPool.h>
15
- #include <Ice/ACM.h>
16
- #include <Ice/ObjectAdapterI.h> // For getThreadPool() and getServantManager().
17
- #include <Ice/EndpointI.h>
18
- #include <Ice/OutgoingAsync.h>
19
- #include <Ice/Incoming.h>
20
- #include <Ice/LocalException.h>
21
- #include <Ice/RequestHandler.h> // For RetryException
22
- #include <Ice/ReferenceFactory.h> // For createProxy().
23
- #include <Ice/ProxyFactory.h> // For createProxy().
24
- #include <Ice/BatchRequestQueue.h>
25
-
26
- #ifdef ICE_HAS_BZIP2
27
- # include <bzlib.h>
28
- #endif
29
-
30
- using namespace std;
31
- using namespace Ice;
32
- using namespace Ice::Instrumentation;
33
- using namespace IceInternal;
34
-
35
- #ifndef ICE_CPP11_MAPPING
36
- Ice::LocalObject* Ice::upCast(ConnectionI* p) { return p; }
37
- #endif
38
-
39
- namespace
40
- {
41
-
42
- const ::std::string flushBatchRequests_name = "flushBatchRequests";
43
-
44
- class TimeoutCallback : public IceUtil::TimerTask
45
- {
46
- public:
47
-
48
- TimeoutCallback(Ice::ConnectionI* connection) : _connection(connection)
49
- {
50
- }
51
-
52
- void
53
- runTimerTask()
54
- {
55
- _connection->timedOut();
56
- }
57
-
58
- private:
59
-
60
- Ice::ConnectionI* _connection;
61
- };
62
-
63
- class DispatchCall : public DispatchWorkItem
64
- {
65
- public:
66
-
67
- DispatchCall(const ConnectionIPtr& connection, const ConnectionI::StartCallbackPtr& startCB,
68
- const vector<ConnectionI::OutgoingMessage>& sentCBs, Byte compress, Int requestId,
69
- Int invokeNum, const ServantManagerPtr& servantManager, const ObjectAdapterPtr& adapter,
70
- const OutgoingAsyncBasePtr& outAsync, const ICE_DELEGATE(HeartbeatCallback)& heartbeatCallback,
71
- InputStream& stream) :
72
- DispatchWorkItem(connection),
73
- _connection(connection),
74
- _startCB(startCB),
75
- _sentCBs(sentCBs),
76
- _compress(compress),
77
- _requestId(requestId),
78
- _invokeNum(invokeNum),
79
- _servantManager(servantManager),
80
- _adapter(adapter),
81
- _outAsync(outAsync),
82
- _heartbeatCallback(heartbeatCallback),
83
- _stream(stream.instance(), currentProtocolEncoding)
84
- {
85
- _stream.swap(stream);
86
- }
87
-
88
- virtual void
89
- run()
90
- {
91
- _connection->dispatch(_startCB, _sentCBs, _compress, _requestId, _invokeNum, _servantManager, _adapter,
92
- _outAsync, _heartbeatCallback, _stream);
93
- }
94
-
95
- private:
96
-
97
- const ConnectionIPtr _connection;
98
- const ConnectionI::StartCallbackPtr _startCB;
99
- const vector<ConnectionI::OutgoingMessage> _sentCBs;
100
- const Byte _compress;
101
- const Int _requestId;
102
- const Int _invokeNum;
103
- const ServantManagerPtr _servantManager;
104
- const ObjectAdapterPtr _adapter;
105
- const OutgoingAsyncBasePtr _outAsync;
106
- const ICE_DELEGATE(HeartbeatCallback) _heartbeatCallback;
107
- InputStream _stream;
108
- };
109
-
110
- class FinishCall : public DispatchWorkItem
111
- {
112
- public:
113
-
114
- FinishCall(const Ice::ConnectionIPtr& connection, bool close) :
115
- DispatchWorkItem(connection), _connection(connection), _close(close)
116
- {
117
- }
118
-
119
- virtual void
120
- run()
121
- {
122
- _connection->finish(_close);
123
- }
124
-
125
- private:
126
-
127
- const ConnectionIPtr _connection;
128
- const bool _close;
129
- };
130
-
131
- //
132
- // Class for handling Ice::Connection::begin_flushBatchRequests
133
- //
134
- class ConnectionFlushBatchAsync : public OutgoingAsyncBase
135
- {
136
- public:
137
-
138
- ConnectionFlushBatchAsync(const Ice::ConnectionIPtr&, const InstancePtr&);
139
-
140
- virtual Ice::ConnectionPtr getConnection() const;
141
-
142
- void invoke(const std::string&, Ice::CompressBatch);
143
-
144
- private:
145
-
146
- const Ice::ConnectionIPtr _connection;
147
- };
148
- typedef IceUtil::Handle<ConnectionFlushBatchAsync> ConnectionFlushBatchAsyncPtr;
149
-
150
- ConnectionState connectionStateMap[] = {
151
- ICE_ENUM(ConnectionState, ConnectionStateValidating), // StateNotInitialized
152
- ICE_ENUM(ConnectionState, ConnectionStateValidating), // StateNotValidated
153
- ICE_ENUM(ConnectionState, ConnectionStateActive), // StateActive
154
- ICE_ENUM(ConnectionState, ConnectionStateHolding), // StateHolding
155
- ICE_ENUM(ConnectionState, ConnectionStateClosing), // StateClosing
156
- ICE_ENUM(ConnectionState, ConnectionStateClosing), // StateClosingPending
157
- ICE_ENUM(ConnectionState, ConnectionStateClosed), // StateClosed
158
- ICE_ENUM(ConnectionState, ConnectionStateClosed), // StateFinished
159
- };
160
-
161
- }
162
-
163
- ConnectionFlushBatchAsync::ConnectionFlushBatchAsync(const ConnectionIPtr& connection, const InstancePtr& instance) :
164
- OutgoingAsyncBase(instance), _connection(connection)
165
- {
166
- }
167
-
168
- ConnectionPtr
169
- ConnectionFlushBatchAsync::getConnection() const
170
- {
171
- return _connection;
172
- }
173
-
174
- void
175
- ConnectionFlushBatchAsync::invoke(const string& operation, Ice::CompressBatch compressBatch)
176
- {
177
- _observer.attach(_instance.get(), operation);
178
- try
179
- {
180
- AsyncStatus status;
181
- bool compress;
182
- int batchRequestNum = _connection->getBatchRequestQueue()->swap(&_os, compress);
183
- if(batchRequestNum == 0)
184
- {
185
- status = AsyncStatusSent;
186
- if(sent())
187
- {
188
- status = static_cast<AsyncStatus>(status | AsyncStatusInvokeSentCallback);
189
- }
190
- }
191
- else
192
- {
193
- if(compressBatch == ICE_SCOPED_ENUM(CompressBatch, Yes))
194
- {
195
- compress = true;
196
- }
197
- else if(compressBatch == ICE_SCOPED_ENUM(CompressBatch, No))
198
- {
199
- compress = false;
200
- }
201
- status = _connection->sendAsyncRequest(ICE_SHARED_FROM_THIS, compress, false, batchRequestNum);
202
- }
203
-
204
- if(status & AsyncStatusSent)
205
- {
206
- _sentSynchronously = true;
207
- if(status & AsyncStatusInvokeSentCallback)
208
- {
209
- invokeSent();
210
- }
211
- }
212
- }
213
- catch(const RetryException& ex)
214
- {
215
- if(exception(*ex.get()))
216
- {
217
- invokeExceptionAsync();
218
- }
219
- }
220
- catch(const Exception& ex)
221
- {
222
- if(exception(ex))
223
- {
224
- invokeExceptionAsync();
225
- }
226
- }
227
- }
228
-
229
- Ice::ConnectionI::Observer::Observer() : _readStreamPos(0), _writeStreamPos(0)
230
- {
231
- }
232
-
233
- void
234
- Ice::ConnectionI::Observer::startRead(const Buffer& buf)
235
- {
236
- if(_readStreamPos)
237
- {
238
- assert(!buf.b.empty());
239
- _observer->receivedBytes(static_cast<int>(buf.i - _readStreamPos));
240
- }
241
- _readStreamPos = buf.b.empty() ? 0 : buf.i;
242
- }
243
-
244
- void
245
- Ice::ConnectionI::Observer::finishRead(const Buffer& buf)
246
- {
247
- if(_readStreamPos == 0)
248
- {
249
- return;
250
- }
251
- assert(buf.i >= _readStreamPos);
252
- _observer->receivedBytes(static_cast<int>(buf.i - _readStreamPos));
253
- _readStreamPos = 0;
254
- }
255
-
256
- void
257
- Ice::ConnectionI::Observer::startWrite(const Buffer& buf)
258
- {
259
- if(_writeStreamPos)
260
- {
261
- assert(!buf.b.empty());
262
- _observer->sentBytes(static_cast<int>(buf.i - _writeStreamPos));
263
- }
264
- _writeStreamPos = buf.b.empty() ? 0 : buf.i;
265
- }
266
-
267
- void
268
- Ice::ConnectionI::Observer::finishWrite(const Buffer& buf)
269
- {
270
- if(_writeStreamPos == 0)
271
- {
272
- return;
273
- }
274
- if(buf.i > _writeStreamPos)
275
- {
276
- _observer->sentBytes(static_cast<int>(buf.i - _writeStreamPos));
277
- }
278
- _writeStreamPos = 0;
279
- }
280
-
281
- void
282
- Ice::ConnectionI::Observer::attach(const Ice::Instrumentation::ConnectionObserverPtr& observer)
283
- {
284
- ObserverHelperT<Ice::Instrumentation::ConnectionObserver>::attach(observer);
285
- if(!observer)
286
- {
287
- _writeStreamPos = 0;
288
- _readStreamPos = 0;
289
- }
290
- }
291
-
292
- void
293
- Ice::ConnectionI::OutgoingMessage::adopt(OutputStream* str)
294
- {
295
- if(adopted)
296
- {
297
- if(str)
298
- {
299
- delete stream;
300
- stream = 0;
301
- adopted = false;
302
- }
303
- else
304
- {
305
- return; // Stream is already adopted.
306
- }
307
- }
308
- else if(!str)
309
- {
310
- if(outAsync)
311
- {
312
- return; // Adopting request stream is not necessary.
313
- }
314
- else
315
- {
316
- str = stream; // Adopt this stream
317
- stream = 0;
318
- }
319
- }
320
-
321
- assert(str);
322
- stream = new OutputStream(str->instance(), currentProtocolEncoding);
323
- stream->swap(*str);
324
- adopted = true;
325
- }
326
-
327
- void
328
- Ice::ConnectionI::OutgoingMessage::canceled(bool adoptStream)
329
- {
330
- assert(outAsync); // Only requests can timeout.
331
- outAsync = 0;
332
- if(adoptStream)
333
- {
334
- adopt(0); // Adopt the request stream
335
- }
336
- else
337
- {
338
- assert(!adopted);
339
- }
340
- }
341
-
342
- bool
343
- Ice::ConnectionI::OutgoingMessage::sent()
344
- {
345
- if(adopted)
346
- {
347
- delete stream;
348
- }
349
- stream = 0;
350
-
351
- if(outAsync)
352
- {
353
- #if defined(ICE_USE_IOCP)
354
- invokeSent = outAsync->sent();
355
- return invokeSent || receivedReply;
356
- #else
357
- return outAsync->sent();
358
- #endif
359
- }
360
- return false;
361
- }
362
-
363
- void
364
- Ice::ConnectionI::OutgoingMessage::completed(const Ice::LocalException& ex)
365
- {
366
- if(outAsync)
367
- {
368
- if(outAsync->exception(ex))
369
- {
370
- outAsync->invokeException();
371
- }
372
- }
373
-
374
- if(adopted)
375
- {
376
- delete stream;
377
- }
378
- stream = 0;
379
- }
380
-
381
- void
382
- Ice::ConnectionI::start(const StartCallbackPtr& callback)
383
- {
384
- try
385
- {
386
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
387
- if(_state >= StateClosed) // The connection might already be closed if the communicator was destroyed.
388
- {
389
- assert(_exception);
390
- _exception->ice_throw();
391
- }
392
-
393
- if(!initialize() || !validate())
394
- {
395
- if(callback)
396
- {
397
- _startCallback = callback;
398
- return;
399
- }
400
-
401
- //
402
- // Wait for the connection to be validated.
403
- //
404
- while(_state <= StateNotValidated)
405
- {
406
- wait();
407
- }
408
-
409
- if(_state >= StateClosing)
410
- {
411
- assert(_exception);
412
- _exception->ice_throw();
413
- }
414
- }
415
-
416
- //
417
- // We start out in holding state.
418
- //
419
- setState(StateHolding);
420
- }
421
- catch(const Ice::LocalException& ex)
422
- {
423
- exception(ex);
424
- if(callback)
425
- {
426
- callback->connectionStartFailed(ICE_SHARED_FROM_THIS, ex);
427
- return;
428
- }
429
- else
430
- {
431
- waitUntilFinished();
432
- throw;
433
- }
434
- }
435
-
436
- if(callback)
437
- {
438
- callback->connectionStartCompleted(ICE_SHARED_FROM_THIS);
439
- }
440
- }
441
-
442
- void
443
- Ice::ConnectionI::activate()
444
- {
445
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
446
- if(_state <= StateNotValidated)
447
- {
448
- return;
449
- }
450
- if(_acmLastActivity != IceUtil::Time())
451
- {
452
- _acmLastActivity = IceUtil::Time::now(IceUtil::Time::Monotonic);
453
- }
454
- setState(StateActive);
455
- }
456
-
457
- void
458
- Ice::ConnectionI::hold()
459
- {
460
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
461
- if(_state <= StateNotValidated)
462
- {
463
- return;
464
- }
465
-
466
- setState(StateHolding);
467
- }
468
-
469
- void
470
- Ice::ConnectionI::destroy(DestructionReason reason)
471
- {
472
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
473
-
474
- switch(reason)
475
- {
476
- case ObjectAdapterDeactivated:
477
- {
478
- setState(StateClosing, ObjectAdapterDeactivatedException(__FILE__, __LINE__));
479
- break;
480
- }
481
-
482
- case CommunicatorDestroyed:
483
- {
484
- setState(StateClosing, CommunicatorDestroyedException(__FILE__, __LINE__));
485
- break;
486
- }
487
- }
488
- }
489
-
490
- void
491
- Ice::ConnectionI::close(ConnectionClose mode) ICE_NOEXCEPT
492
- {
493
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
494
-
495
- if(mode == ICE_SCOPED_ENUM(ConnectionClose, Forcefully))
496
- {
497
- setState(StateClosed, ConnectionManuallyClosedException(__FILE__, __LINE__, false));
498
- }
499
- else if(mode == ICE_SCOPED_ENUM(ConnectionClose, Gracefully))
500
- {
501
- setState(StateClosing, ConnectionManuallyClosedException(__FILE__, __LINE__, true));
502
- }
503
- else
504
- {
505
- assert(mode == ICE_SCOPED_ENUM(ConnectionClose, GracefullyWithWait));
506
-
507
- //
508
- // Wait until all outstanding requests have been completed.
509
- //
510
- while(!_asyncRequests.empty())
511
- {
512
- wait();
513
- }
514
-
515
- setState(StateClosing, ConnectionManuallyClosedException(__FILE__, __LINE__, true));
516
- }
517
- }
518
-
519
- bool
520
- Ice::ConnectionI::isActiveOrHolding() const
521
- {
522
- //
523
- // We can not use trylock here, otherwise the outgoing connection
524
- // factory might return destroyed (closing or closed) connections,
525
- // resulting in connection retry exhaustion.
526
- //
527
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
528
-
529
- return _state > StateNotValidated && _state < StateClosing;
530
- }
531
-
532
- bool
533
- Ice::ConnectionI::isFinished() const
534
- {
535
- //
536
- // We can use trylock here, because as long as there are still
537
- // threads operating in this connection object, connection
538
- // destruction is considered as not yet finished.
539
- //
540
- IceUtil::Monitor<IceUtil::Mutex>::TryLock sync(*this);
541
-
542
- if(!sync.acquired())
543
- {
544
- return false;
545
- }
546
-
547
- if(_state != StateFinished || _dispatchCount != 0)
548
- {
549
- return false;
550
- }
551
-
552
- assert(_state == StateFinished);
553
- return true;
554
- }
555
-
556
- void
557
- Ice::ConnectionI::throwException() const
558
- {
559
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
560
-
561
- if(_exception)
562
- {
563
- assert(_state >= StateClosing);
564
- _exception->ice_throw();
565
- }
566
- }
567
-
568
- void
569
- Ice::ConnectionI::waitUntilHolding() const
570
- {
571
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
572
-
573
- while(_state < StateHolding || _dispatchCount > 0)
574
- {
575
- wait();
576
- }
577
- }
578
-
579
- void
580
- Ice::ConnectionI::waitUntilFinished()
581
- {
582
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
583
-
584
- //
585
- // We wait indefinitely until the connection is finished and all
586
- // outstanding requests are completed. Otherwise we couldn't
587
- // guarantee that there are no outstanding calls when deactivate()
588
- // is called on the servant locators.
589
- //
590
- while(_state < StateFinished || _dispatchCount > 0)
591
- {
592
- wait();
593
- }
594
-
595
- assert(_state == StateFinished);
596
-
597
- //
598
- // Clear the OA. See bug 1673 for the details of why this is necessary.
599
- //
600
- _adapter = 0;
601
- }
602
-
603
- void
604
- Ice::ConnectionI::updateObserver()
605
- {
606
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
607
- if(_state < StateNotValidated || _state > StateClosed)
608
- {
609
- return;
610
- }
611
-
612
- assert(_instance->initializationData().observer);
613
-
614
- ConnectionObserverPtr o = _instance->initializationData().observer->getConnectionObserver(initConnectionInfo(),
615
- _endpoint,
616
- toConnectionState(_state),
617
- _observer.get());
618
- _observer.attach(o);
619
- }
620
-
621
- void
622
- Ice::ConnectionI::monitor(const IceUtil::Time& now, const ACMConfig& acm)
623
- {
624
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
625
- if(_state != StateActive)
626
- {
627
- return;
628
- }
629
- assert(acm.timeout != IceUtil::Time());
630
-
631
- //
632
- // We send a heartbeat if there was no activity in the last
633
- // (timeout / 4) period. Sending a heartbeat sooner than really
634
- // needed is safer to ensure that the receiver will receive the
635
- // heartbeat in time. Sending the heartbeat if there was no
636
- // activity in the last (timeout / 2) period isn't enough since
637
- // monitor() is called only every (timeout / 2) period.
638
- //
639
- // Note that this doesn't imply that we are sending 4 heartbeats
640
- // per timeout period because the monitor() method is still only
641
- // called every (timeout / 2) period.
642
- //
643
- if(acm.heartbeat == ICE_ENUM(ACMHeartbeat, HeartbeatAlways) ||
644
- (acm.heartbeat != ICE_ENUM(ACMHeartbeat, HeartbeatOff) &&
645
- _writeStream.b.empty() && now >= (_acmLastActivity + acm.timeout / 4)))
646
- {
647
- if(acm.heartbeat != ICE_ENUM(ACMHeartbeat, HeartbeatOnDispatch) || _dispatchCount > 0)
648
- {
649
- sendHeartbeatNow();
650
- }
651
- }
652
-
653
- if(static_cast<Int>(_readStream.b.size()) > headerSize || !_writeStream.b.empty())
654
- {
655
- //
656
- // If writing or reading, nothing to do, the connection
657
- // timeout will kick-in if writes or reads don't progress.
658
- // This check is necessary because the actitivy timer is
659
- // only set when a message is fully read/written.
660
- //
661
- return;
662
- }
663
-
664
- if(acm.close != ICE_ENUM(ACMClose, CloseOff) && now >= (_acmLastActivity + acm.timeout))
665
- {
666
- if(acm.close == ICE_ENUM(ACMClose, CloseOnIdleForceful) ||
667
- (acm.close != ICE_ENUM(ACMClose, CloseOnIdle) && !_asyncRequests.empty()))
668
- {
669
- //
670
- // Close the connection if we didn't receive a heartbeat in
671
- // the last period.
672
- //
673
- setState(StateClosed, ConnectionTimeoutException(__FILE__, __LINE__));
674
- }
675
- else if(acm.close != ICE_ENUM(ACMClose, CloseOnInvocation) &&
676
- _dispatchCount == 0 && _batchRequestQueue->isEmpty() && _asyncRequests.empty())
677
- {
678
- //
679
- // The connection is idle, close it.
680
- //
681
- setState(StateClosing, ConnectionTimeoutException(__FILE__, __LINE__));
682
- }
683
- }
684
- }
685
-
686
- AsyncStatus
687
- Ice::ConnectionI::sendAsyncRequest(const OutgoingAsyncBasePtr& out, bool compress, bool response, int batchRequestNum)
688
- {
689
- OutputStream* os = out->getOs();
690
-
691
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
692
- //
693
- // If the exception is closed before we even have a chance
694
- // to send our request, we always try to send the request
695
- // again.
696
- //
697
- if(_exception)
698
- {
699
- throw RetryException(*_exception);
700
- }
701
- assert(_state > StateNotValidated);
702
- assert(_state < StateClosing);
703
-
704
- //
705
- // Ensure the message isn't bigger than what we can send with the
706
- // transport.
707
- //
708
- _transceiver->checkSendSize(*os);
709
-
710
- //
711
- // Notify the request that it's cancelable with this connection.
712
- // This will throw if the request is canceled.
713
- //
714
- out->cancelable(ICE_SHARED_FROM_THIS);
715
- Int requestId = 0;
716
- if(response)
717
- {
718
- //
719
- // Create a new unique request ID.
720
- //
721
- requestId = _nextRequestId++;
722
- if(requestId <= 0)
723
- {
724
- _nextRequestId = 1;
725
- requestId = _nextRequestId++;
726
- }
727
-
728
- //
729
- // Fill in the request ID.
730
- //
731
- const Byte* p = reinterpret_cast<const Byte*>(&requestId);
732
- #ifdef ICE_BIG_ENDIAN
733
- reverse_copy(p, p + sizeof(Int), os->b.begin() + headerSize);
734
- #else
735
- copy(p, p + sizeof(Int), os->b.begin() + headerSize);
736
- #endif
737
- }
738
- else if(batchRequestNum > 0)
739
- {
740
- const Byte* p = reinterpret_cast<const Byte*>(&batchRequestNum);
741
- #ifdef ICE_BIG_ENDIAN
742
- reverse_copy(p, p + sizeof(Int), os->b.begin() + headerSize);
743
- #else
744
- copy(p, p + sizeof(Int), os->b.begin() + headerSize);
745
- #endif
746
- }
747
-
748
- out->attachRemoteObserver(initConnectionInfo(), _endpoint, requestId);
749
-
750
- AsyncStatus status = AsyncStatusQueued;
751
- try
752
- {
753
- OutgoingMessage message(out, os, compress, requestId);
754
- status = sendMessage(message);
755
- }
756
- catch(const LocalException& ex)
757
- {
758
- setState(StateClosed, ex);
759
- assert(_exception);
760
- _exception->ice_throw();
761
- }
762
-
763
- if(response)
764
- {
765
- //
766
- // Add to the async requests map.
767
- //
768
- _asyncRequestsHint = _asyncRequests.insert(_asyncRequests.end(),
769
- pair<const Int, OutgoingAsyncBasePtr>(requestId, out));
770
- }
771
- return status;
772
- }
773
-
774
- BatchRequestQueuePtr
775
- Ice::ConnectionI::getBatchRequestQueue() const
776
- {
777
- return _batchRequestQueue;
778
- }
779
-
780
- #ifdef ICE_CPP11_MAPPING
781
- std::function<void()>
782
- Ice::ConnectionI::flushBatchRequestsAsync(CompressBatch compress,
783
- ::std::function<void(::std::exception_ptr)> ex,
784
- ::std::function<void(bool)> sent)
785
- {
786
- class ConnectionFlushBatchLambda : public ConnectionFlushBatchAsync, public LambdaInvoke
787
- {
788
- public:
789
-
790
- ConnectionFlushBatchLambda(std::shared_ptr<Ice::ConnectionI>&& connection,
791
- const InstancePtr& instance,
792
- std::function<void(std::exception_ptr)> ex,
793
- std::function<void(bool)> sent) :
794
- ConnectionFlushBatchAsync(connection, instance), LambdaInvoke(std::move(ex), std::move(sent))
795
- {
796
- }
797
- };
798
- auto outAsync = make_shared<ConnectionFlushBatchLambda>(ICE_SHARED_FROM_THIS, _instance, ex, sent);
799
- outAsync->invoke(flushBatchRequests_name, compress);
800
- return [outAsync]() { outAsync->cancel(); };
801
- }
802
- #else
803
- void
804
- Ice::ConnectionI::flushBatchRequests(CompressBatch compress)
805
- {
806
- end_flushBatchRequests(begin_flushBatchRequests(compress));
807
- }
808
-
809
- AsyncResultPtr
810
- Ice::ConnectionI::begin_flushBatchRequests(CompressBatch compress)
811
- {
812
- return _iceI_begin_flushBatchRequests(compress, dummyCallback, 0);
813
- }
814
-
815
- AsyncResultPtr
816
- Ice::ConnectionI::begin_flushBatchRequests(CompressBatch compress,
817
- const CallbackPtr& cb,
818
- const LocalObjectPtr& cookie)
819
- {
820
- return _iceI_begin_flushBatchRequests(compress, cb, cookie);
821
- }
822
-
823
- AsyncResultPtr
824
- Ice::ConnectionI::begin_flushBatchRequests(CompressBatch compress,
825
- const Callback_Connection_flushBatchRequestsPtr& cb,
826
- const LocalObjectPtr& cookie)
827
- {
828
- return _iceI_begin_flushBatchRequests(compress, cb, cookie);
829
- }
830
-
831
- AsyncResultPtr
832
- Ice::ConnectionI::_iceI_begin_flushBatchRequests(CompressBatch compress,
833
- const CallbackBasePtr& cb,
834
- const LocalObjectPtr& cookie)
835
- {
836
- class ConnectionFlushBatchAsyncWithCallback : public ConnectionFlushBatchAsync, public CallbackCompletion
837
- {
838
- public:
839
-
840
- ConnectionFlushBatchAsyncWithCallback(const Ice::ConnectionIPtr& connection,
841
- const Ice::CommunicatorPtr& communicator,
842
- const InstancePtr& instance,
843
- const CallbackBasePtr& callback,
844
- const Ice::LocalObjectPtr& cookie) :
845
- ConnectionFlushBatchAsync(connection, instance),
846
- CallbackCompletion(callback, cookie),
847
- _communicator(communicator),
848
- _connection(connection)
849
- {
850
- _cookie = cookie;
851
- }
852
-
853
- virtual Ice::CommunicatorPtr getCommunicator() const
854
- {
855
- return _communicator;
856
- }
857
-
858
- virtual Ice::ConnectionPtr getConnection() const
859
- {
860
- return _connection;
861
- }
862
-
863
- virtual const std::string&
864
- getOperation() const
865
- {
866
- return flushBatchRequests_name;
867
- }
868
-
869
- private:
870
-
871
- Ice::CommunicatorPtr _communicator;
872
- Ice::ConnectionPtr _connection;
873
- };
874
-
875
- ConnectionFlushBatchAsyncPtr result = new ConnectionFlushBatchAsyncWithCallback(this,
876
- _communicator,
877
- _instance,
878
- cb,
879
- cookie);
880
- result->invoke(flushBatchRequests_name, compress);
881
- return result;
882
- }
883
-
884
- void
885
- Ice::ConnectionI::end_flushBatchRequests(const AsyncResultPtr& r)
886
- {
887
- AsyncResult::_check(r, this, flushBatchRequests_name);
888
- r->_waitForResponse();
889
- }
890
- #endif
891
-
892
- namespace
893
- {
894
-
895
- const ::std::string heartbeat_name = "heartbeat";
896
-
897
- class HeartbeatAsync : public OutgoingAsyncBase
898
- {
899
- public:
900
-
901
- HeartbeatAsync(const ConnectionIPtr& connection,
902
- const CommunicatorPtr& communicator,
903
- const InstancePtr& instance) :
904
- OutgoingAsyncBase(instance),
905
- _communicator(communicator),
906
- _connection(connection)
907
- {
908
- }
909
-
910
- virtual CommunicatorPtr getCommunicator() const
911
- {
912
- return _communicator;
913
- }
914
-
915
- virtual ConnectionPtr getConnection() const
916
- {
917
- return _connection;
918
- }
919
-
920
- virtual const string& getOperation() const
921
- {
922
- return heartbeat_name;
923
- }
924
-
925
- void invoke()
926
- {
927
- _observer.attach(_instance.get(), heartbeat_name);
928
- try
929
- {
930
- _os.write(magic[0]);
931
- _os.write(magic[1]);
932
- _os.write(magic[2]);
933
- _os.write(magic[3]);
934
- _os.write(currentProtocol);
935
- _os.write(currentProtocolEncoding);
936
- _os.write(validateConnectionMsg);
937
- _os.write(static_cast<Byte>(0)); // Compression status (always zero for validate connection).
938
- _os.write(headerSize); // Message size.
939
- _os.i = _os.b.begin();
940
-
941
- AsyncStatus status = _connection->sendAsyncRequest(ICE_SHARED_FROM_THIS, false, false, 0);
942
- if(status & AsyncStatusSent)
943
- {
944
- _sentSynchronously = true;
945
- if(status & AsyncStatusInvokeSentCallback)
946
- {
947
- invokeSent();
948
- }
949
- }
950
- }
951
- catch(const RetryException& ex)
952
- {
953
- if(exception(*ex.get()))
954
- {
955
- invokeExceptionAsync();
956
- }
957
- }
958
- catch(const Exception& ex)
959
- {
960
- if(exception(ex))
961
- {
962
- invokeExceptionAsync();
963
- }
964
- }
965
- }
966
-
967
- private:
968
-
969
- CommunicatorPtr _communicator;
970
- ConnectionIPtr _connection;
971
- };
972
- typedef IceUtil::Handle<HeartbeatAsync> HeartbeatAsyncPtr;
973
-
974
- }
975
-
976
- #ifdef ICE_CPP11_MAPPING
977
- void
978
- Ice::ConnectionI::heartbeat()
979
- {
980
- Connection::heartbeatAsync().get();
981
- }
982
-
983
- std::function<void()>
984
- Ice::ConnectionI::heartbeatAsync(::std::function<void(::std::exception_ptr)> ex, ::std::function<void(bool)> sent)
985
- {
986
- class HeartbeatLambda : public HeartbeatAsync, public LambdaInvoke
987
- {
988
- public:
989
-
990
- HeartbeatLambda(std::shared_ptr<Ice::ConnectionI>&& connection,
991
- std::shared_ptr<Ice::Communicator>& communicator,
992
- const InstancePtr& instance,
993
- std::function<void(std::exception_ptr)> ex,
994
- std::function<void(bool)> sent) :
995
- HeartbeatAsync(connection, communicator, instance), LambdaInvoke(std::move(ex), std::move(sent))
996
- {
997
- }
998
- };
999
- auto outAsync = make_shared<HeartbeatLambda>(ICE_SHARED_FROM_THIS, _communicator, _instance, ex, sent);
1000
- outAsync->invoke();
1001
- return [outAsync]() { outAsync->cancel(); };
1002
- }
1003
- #else
1004
- void
1005
- Ice::ConnectionI::heartbeat()
1006
- {
1007
- end_heartbeat(begin_heartbeat());
1008
- }
1009
-
1010
- AsyncResultPtr
1011
- Ice::ConnectionI::begin_heartbeat()
1012
- {
1013
- return _iceI_begin_heartbeat(dummyCallback, 0);
1014
- }
1015
-
1016
- AsyncResultPtr
1017
- Ice::ConnectionI::begin_heartbeat(const CallbackPtr& cb, const LocalObjectPtr& cookie)
1018
- {
1019
- return _iceI_begin_heartbeat(cb, cookie);
1020
- }
1021
-
1022
- AsyncResultPtr
1023
- Ice::ConnectionI::begin_heartbeat(const Callback_Connection_heartbeatPtr& cb, const LocalObjectPtr& cookie)
1024
- {
1025
- return _iceI_begin_heartbeat(cb, cookie);
1026
- }
1027
-
1028
- AsyncResultPtr
1029
- Ice::ConnectionI::_iceI_begin_heartbeat(const CallbackBasePtr& cb, const LocalObjectPtr& cookie)
1030
- {
1031
- class HeartbeatCallback : public HeartbeatAsync, public CallbackCompletion
1032
- {
1033
- public:
1034
-
1035
- HeartbeatCallback(const ConnectionIPtr& connection,
1036
- const CommunicatorPtr& communicator,
1037
- const InstancePtr& instance,
1038
- const CallbackBasePtr& callback,
1039
- const LocalObjectPtr& cookie) :
1040
- HeartbeatAsync(connection, communicator, instance),
1041
- CallbackCompletion(callback, cookie)
1042
- {
1043
- _cookie = cookie;
1044
- }
1045
- };
1046
-
1047
- HeartbeatAsyncPtr result = new HeartbeatCallback(this, _communicator, _instance, cb, cookie);
1048
- result->invoke();
1049
- return result;
1050
- }
1051
-
1052
- void
1053
- Ice::ConnectionI::end_heartbeat(const AsyncResultPtr& r)
1054
- {
1055
- AsyncResult::_check(r, this, heartbeat_name);
1056
- r->_waitForResponse();
1057
- }
1058
- #endif
1059
-
1060
- void
1061
- Ice::ConnectionI::setHeartbeatCallback(ICE_IN(ICE_DELEGATE(HeartbeatCallback)) callback)
1062
- {
1063
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1064
- if(_state >= StateClosed)
1065
- {
1066
- return;
1067
- }
1068
- _heartbeatCallback = callback;
1069
- }
1070
-
1071
- void
1072
- Ice::ConnectionI::setCloseCallback(ICE_IN(ICE_DELEGATE(CloseCallback)) callback)
1073
- {
1074
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1075
- if(_state >= StateClosed)
1076
- {
1077
- if(callback)
1078
- {
1079
- class CallbackWorkItem : public DispatchWorkItem
1080
- {
1081
- public:
1082
-
1083
- CallbackWorkItem(const ConnectionIPtr& connection, ICE_IN(ICE_DELEGATE(CloseCallback)) callback) :
1084
- _connection(connection),
1085
- #ifdef ICE_CPP11_MAPPING
1086
- _callback(std::move(callback))
1087
- #else
1088
- _callback(callback)
1089
- #endif
1090
- {
1091
- }
1092
-
1093
- virtual void run()
1094
- {
1095
- _connection->closeCallback(_callback);
1096
- }
1097
-
1098
- private:
1099
-
1100
- const ConnectionIPtr _connection;
1101
- const ICE_DELEGATE(CloseCallback) _callback;
1102
- };
1103
- #ifdef ICE_CPP11_MAPPING
1104
- _threadPool->dispatch(new CallbackWorkItem(ICE_SHARED_FROM_THIS, std::move(callback)));
1105
- #else
1106
- _threadPool->dispatch(new CallbackWorkItem(ICE_SHARED_FROM_THIS, callback));
1107
- #endif
1108
- }
1109
- }
1110
- else
1111
- {
1112
- _closeCallback = callback;
1113
- }
1114
- }
1115
-
1116
- void
1117
- Ice::ConnectionI::closeCallback(const ICE_DELEGATE(CloseCallback)& callback)
1118
- {
1119
- try
1120
- {
1121
- #ifdef ICE_CPP11_MAPPING
1122
- callback(ICE_SHARED_FROM_THIS);
1123
- #else
1124
- callback->closed(ICE_SHARED_FROM_THIS);
1125
- #endif
1126
- }
1127
- catch(const std::exception& ex)
1128
- {
1129
- Error out(_instance->initializationData().logger);
1130
- out << "connection callback exception:\n" << ex << '\n' << _desc;
1131
- }
1132
- catch(...)
1133
- {
1134
- Error out(_instance->initializationData().logger);
1135
- out << "connection callback exception:\nunknown c++ exception" << '\n' << _desc;
1136
- }
1137
- }
1138
-
1139
- void
1140
- Ice::ConnectionI::setACM(const IceUtil::Optional<int>& timeout,
1141
- const IceUtil::Optional<Ice::ACMClose>& close,
1142
- const IceUtil::Optional<Ice::ACMHeartbeat>& heartbeat)
1143
- {
1144
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1145
- if(timeout && *timeout < 0)
1146
- {
1147
- #ifdef ICE_CPP11_MAPPING
1148
- throw invalid_argument("invalid negative ACM timeout value");
1149
- #else
1150
- throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "invalid negative ACM timeout value");
1151
- #endif
1152
- }
1153
- if(!_monitor || _state >= StateClosed)
1154
- {
1155
- return;
1156
- }
1157
-
1158
- if(_state == StateActive)
1159
- {
1160
- _monitor->remove(ICE_SHARED_FROM_THIS);
1161
- }
1162
- _monitor = _monitor->acm(timeout, close, heartbeat);
1163
-
1164
- if(_monitor->getACM().timeout <= 0)
1165
- {
1166
- _acmLastActivity = IceUtil::Time(); // Disable the recording of last activity.
1167
- }
1168
- else if(_acmLastActivity == IceUtil::Time() && _state == StateActive)
1169
- {
1170
- _acmLastActivity = IceUtil::Time::now(IceUtil::Time::Monotonic);
1171
- }
1172
-
1173
- if(_state == StateActive)
1174
- {
1175
- _monitor->add(ICE_SHARED_FROM_THIS);
1176
- }
1177
- }
1178
-
1179
- ACM
1180
- Ice::ConnectionI::getACM() ICE_NOEXCEPT
1181
- {
1182
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1183
- ACM acm;
1184
- acm.timeout = 0;
1185
- acm.close = ICE_ENUM(ACMClose, CloseOff);
1186
- acm.heartbeat = ICE_ENUM(ACMHeartbeat, HeartbeatOff);
1187
- return _monitor ? _monitor->getACM() : acm;
1188
- }
1189
-
1190
- void
1191
- Ice::ConnectionI::asyncRequestCanceled(const OutgoingAsyncBasePtr& outAsync, const LocalException& ex)
1192
- {
1193
- //
1194
- // NOTE: This isn't called from a thread pool thread.
1195
- //
1196
-
1197
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1198
- if(_state >= StateClosed)
1199
- {
1200
- return; // The request has already been or will be shortly notified of the failure.
1201
- }
1202
-
1203
- for(deque<OutgoingMessage>::iterator o = _sendStreams.begin(); o != _sendStreams.end(); ++o)
1204
- {
1205
- if(o->outAsync.get() == outAsync.get())
1206
- {
1207
- if(o->requestId)
1208
- {
1209
- if(_asyncRequestsHint != _asyncRequests.end() &&
1210
- _asyncRequestsHint->second == ICE_DYNAMIC_CAST(OutgoingAsync, outAsync))
1211
- {
1212
- _asyncRequests.erase(_asyncRequestsHint);
1213
- _asyncRequestsHint = _asyncRequests.end();
1214
- }
1215
- else
1216
- {
1217
- _asyncRequests.erase(o->requestId);
1218
- }
1219
- }
1220
-
1221
- if(dynamic_cast<const Ice::ConnectionTimeoutException*>(&ex))
1222
- {
1223
- setState(StateClosed, ex);
1224
- }
1225
- else
1226
- {
1227
- //
1228
- // If the request is being sent, don't remove it from the send streams,
1229
- // it will be removed once the sending is finished.
1230
- //
1231
- if(o == _sendStreams.begin())
1232
- {
1233
- o->canceled(true); // true = adopt the stream
1234
- }
1235
- else
1236
- {
1237
- o->canceled(false);
1238
- _sendStreams.erase(o);
1239
- }
1240
- if(outAsync->exception(ex))
1241
- {
1242
- outAsync->invokeExceptionAsync();
1243
- }
1244
- }
1245
- return;
1246
- }
1247
- }
1248
-
1249
- if(ICE_DYNAMIC_CAST(OutgoingAsync, outAsync))
1250
- {
1251
- if(_asyncRequestsHint != _asyncRequests.end())
1252
- {
1253
- if(_asyncRequestsHint->second == outAsync)
1254
- {
1255
- if(dynamic_cast<const Ice::ConnectionTimeoutException*>(&ex))
1256
- {
1257
- setState(StateClosed, ex);
1258
- }
1259
- else
1260
- {
1261
- _asyncRequests.erase(_asyncRequestsHint);
1262
- _asyncRequestsHint = _asyncRequests.end();
1263
- if(outAsync->exception(ex))
1264
- {
1265
- outAsync->invokeExceptionAsync();
1266
- }
1267
- }
1268
- return;
1269
- }
1270
- }
1271
-
1272
- for(map<Int, OutgoingAsyncBasePtr>::iterator p = _asyncRequests.begin(); p != _asyncRequests.end(); ++p)
1273
- {
1274
- if(p->second.get() == outAsync.get())
1275
- {
1276
- if(dynamic_cast<const Ice::ConnectionTimeoutException*>(&ex))
1277
- {
1278
- setState(StateClosed, ex);
1279
- }
1280
- else
1281
- {
1282
- assert(p != _asyncRequestsHint);
1283
- _asyncRequests.erase(p);
1284
- if(outAsync->exception(ex))
1285
- {
1286
- outAsync->invokeExceptionAsync();
1287
- }
1288
- }
1289
- return;
1290
- }
1291
- }
1292
- }
1293
- }
1294
-
1295
- void
1296
- Ice::ConnectionI::sendResponse(Int, OutputStream* os, Byte compressFlag, bool /*amd*/)
1297
- {
1298
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1299
- assert(_state > StateNotValidated);
1300
-
1301
- try
1302
- {
1303
- if(--_dispatchCount == 0)
1304
- {
1305
- if(_state == StateFinished)
1306
- {
1307
- reap();
1308
- }
1309
- notifyAll();
1310
- }
1311
-
1312
- if(_state >= StateClosed)
1313
- {
1314
- assert(_exception);
1315
- _exception->ice_throw();
1316
- }
1317
-
1318
- OutgoingMessage message(os, compressFlag > 0);
1319
- sendMessage(message);
1320
-
1321
- if(_state == StateClosing && _dispatchCount == 0)
1322
- {
1323
- initiateShutdown();
1324
- }
1325
-
1326
- return;
1327
- }
1328
- catch(const LocalException& ex)
1329
- {
1330
- setState(StateClosed, ex);
1331
- }
1332
- }
1333
-
1334
- void
1335
- Ice::ConnectionI::sendNoResponse()
1336
- {
1337
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1338
- assert(_state > StateNotValidated);
1339
-
1340
- try
1341
- {
1342
- if(--_dispatchCount == 0)
1343
- {
1344
- if(_state == StateFinished)
1345
- {
1346
- reap();
1347
- }
1348
- notifyAll();
1349
- }
1350
-
1351
- if(_state >= StateClosed)
1352
- {
1353
- assert(_exception);
1354
- _exception->ice_throw();
1355
- }
1356
-
1357
- if(_state == StateClosing && _dispatchCount == 0)
1358
- {
1359
- initiateShutdown();
1360
- }
1361
- }
1362
- catch(const LocalException& ex)
1363
- {
1364
- setState(StateClosed, ex);
1365
- }
1366
- }
1367
-
1368
- bool
1369
- Ice::ConnectionI::systemException(Int, const SystemException&, bool /*amd*/)
1370
- {
1371
- return false; // System exceptions aren't marshalled.
1372
- }
1373
-
1374
- void
1375
- Ice::ConnectionI::invokeException(Ice::Int, const LocalException& ex, int invokeNum, bool /*amd*/)
1376
- {
1377
- //
1378
- // Fatal exception while invoking a request. Since sendResponse/sendNoResponse isn't
1379
- // called in case of a fatal exception we decrement _dispatchCount here.
1380
- //
1381
-
1382
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1383
- setState(StateClosed, ex);
1384
-
1385
- if(invokeNum > 0)
1386
- {
1387
- assert(_dispatchCount >= invokeNum);
1388
- _dispatchCount -= invokeNum;
1389
- if(_dispatchCount == 0)
1390
- {
1391
- if(_state == StateFinished)
1392
- {
1393
- reap();
1394
- }
1395
- notifyAll();
1396
- }
1397
- }
1398
- }
1399
-
1400
- EndpointIPtr
1401
- Ice::ConnectionI::endpoint() const
1402
- {
1403
- return _endpoint; // No mutex protection necessary, _endpoint is immutable.
1404
- }
1405
-
1406
- ConnectorPtr
1407
- Ice::ConnectionI::connector() const
1408
- {
1409
- return _connector; // No mutex protection necessary, _connector is immutable.
1410
- }
1411
-
1412
- void
1413
- Ice::ConnectionI::setAdapter(const ObjectAdapterPtr& adapter)
1414
- {
1415
- if(adapter)
1416
- {
1417
- // Go through the adapter to set the adapter and servant manager on this connection
1418
- // to ensure the object adapter is still active.
1419
- dynamic_cast<ObjectAdapterI*>(adapter.get())->setAdapterOnConnection(ICE_SHARED_FROM_THIS);
1420
- }
1421
- else
1422
- {
1423
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1424
- if(_state <= StateNotValidated || _state >= StateClosing)
1425
- {
1426
- return;
1427
- }
1428
-
1429
- _adapter = 0;
1430
- _servantManager = 0;
1431
- }
1432
-
1433
- //
1434
- // We never change the thread pool with which we were initially
1435
- // registered, even if we add or remove an object adapter.
1436
- //
1437
- }
1438
-
1439
- ObjectAdapterPtr
1440
- Ice::ConnectionI::getAdapter() const ICE_NOEXCEPT
1441
- {
1442
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1443
- return _adapter;
1444
- }
1445
-
1446
- EndpointPtr
1447
- Ice::ConnectionI::getEndpoint() const ICE_NOEXCEPT
1448
- {
1449
- return _endpoint; // No mutex protection necessary, _endpoint is immutable.
1450
- }
1451
-
1452
- ObjectPrxPtr
1453
- Ice::ConnectionI::createProxy(const Identity& ident) const
1454
- {
1455
- //
1456
- // Create a reference and return a reverse proxy for this
1457
- // reference.
1458
- //
1459
- return _instance->proxyFactory()->referenceToProxy(
1460
- _instance->referenceFactory()->create(ident, ICE_SHARED_FROM_CONST_THIS(ConnectionI)));
1461
- }
1462
-
1463
- void
1464
- Ice::ConnectionI::setAdapterAndServantManager(const ObjectAdapterPtr& adapter,
1465
- const IceInternal::ServantManagerPtr& servantManager)
1466
- {
1467
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1468
- if(_state <= StateNotValidated || _state >= StateClosing)
1469
- {
1470
- return;
1471
- }
1472
- assert(adapter); // Called by ObjectAdapterI::setAdapterOnConnection
1473
- _adapter = adapter;
1474
- _servantManager = servantManager;
1475
- }
1476
-
1477
- #if defined(ICE_USE_IOCP)
1478
- bool
1479
- Ice::ConnectionI::startAsync(SocketOperation operation)
1480
- {
1481
- if(_state >= StateClosed)
1482
- {
1483
- return false;
1484
- }
1485
-
1486
- try
1487
- {
1488
- if(operation & SocketOperationWrite)
1489
- {
1490
- if(_observer)
1491
- {
1492
- _observer.startWrite(_writeStream);
1493
- }
1494
-
1495
- if(_transceiver->startWrite(_writeStream) && !_sendStreams.empty())
1496
- {
1497
- // The whole message is written, assume it's sent now for at-most-once semantics.
1498
- _sendStreams.front().isSent = true;
1499
- }
1500
- }
1501
- else if(operation & SocketOperationRead)
1502
- {
1503
- if(_observer && !_readHeader)
1504
- {
1505
- _observer.startRead(_readStream);
1506
- }
1507
-
1508
- _transceiver->startRead(_readStream);
1509
- }
1510
- }
1511
- catch(const Ice::LocalException& ex)
1512
- {
1513
- setState(StateClosed, ex);
1514
- return false;
1515
- }
1516
- return true;
1517
- }
1518
-
1519
- bool
1520
- Ice::ConnectionI::finishAsync(SocketOperation operation)
1521
- {
1522
- try
1523
- {
1524
- if(operation & SocketOperationWrite)
1525
- {
1526
- Buffer::Container::iterator start = _writeStream.i;
1527
- _transceiver->finishWrite(_writeStream);
1528
- if(_instance->traceLevels()->network >= 3 && _writeStream.i != start)
1529
- {
1530
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
1531
- out << "sent " << (_writeStream.i - start);
1532
- if(!_endpoint->datagram())
1533
- {
1534
- out << " of " << (_writeStream.b.end() - start);
1535
- }
1536
- out << " bytes via " << _endpoint->protocol() << "\n" << toString();
1537
- }
1538
-
1539
- if(_observer)
1540
- {
1541
- _observer.finishWrite(_writeStream);
1542
- }
1543
- }
1544
- else if(operation & SocketOperationRead)
1545
- {
1546
- Buffer::Container::iterator start = _readStream.i;
1547
- _transceiver->finishRead(_readStream);
1548
- if(_instance->traceLevels()->network >= 3 && _readStream.i != start)
1549
- {
1550
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
1551
- out << "received ";
1552
- if(_endpoint->datagram())
1553
- {
1554
- out << _readStream.b.size();
1555
- }
1556
- else
1557
- {
1558
- out << (_readStream.i - start) << " of " << (_readStream.b.end() - start);
1559
- }
1560
- out << " bytes via " << _endpoint->protocol() << "\n" << toString();
1561
- }
1562
-
1563
- if(_observer && !_readHeader)
1564
- {
1565
- _observer.finishRead(_readStream);
1566
- }
1567
- }
1568
- }
1569
- catch(const Ice::LocalException& ex)
1570
- {
1571
- setState(StateClosed, ex);
1572
- }
1573
- return _state < StateClosed;
1574
- }
1575
- #endif
1576
-
1577
- void
1578
- Ice::ConnectionI::message(ThreadPoolCurrent& current)
1579
- {
1580
- StartCallbackPtr startCB;
1581
- vector<OutgoingMessage> sentCBs;
1582
- Byte compress = 0;
1583
- Int requestId = 0;
1584
- Int invokeNum = 0;
1585
- ServantManagerPtr servantManager;
1586
- ObjectAdapterPtr adapter;
1587
- OutgoingAsyncBasePtr outAsync;
1588
- ICE_DELEGATE(HeartbeatCallback) heartbeatCallback;
1589
- int dispatchCount = 0;
1590
-
1591
- ThreadPoolMessage<ConnectionI> msg(current, *this);
1592
- {
1593
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1594
-
1595
- ThreadPoolMessage<ConnectionI>::IOScope io(msg);
1596
- if(!io)
1597
- {
1598
- return;
1599
- }
1600
-
1601
- if(_state >= StateClosed)
1602
- {
1603
- return;
1604
- }
1605
-
1606
- SocketOperation readyOp = current.operation;
1607
- try
1608
- {
1609
- unscheduleTimeout(current.operation);
1610
-
1611
- SocketOperation writeOp = SocketOperationNone;
1612
- SocketOperation readOp = SocketOperationNone;
1613
- if(readyOp & SocketOperationWrite)
1614
- {
1615
- if(_observer)
1616
- {
1617
- _observer.startWrite(_writeStream);
1618
- }
1619
- writeOp = write(_writeStream);
1620
- if(_observer && !(writeOp & SocketOperationWrite))
1621
- {
1622
- _observer.finishWrite(_writeStream);
1623
- }
1624
- }
1625
-
1626
- while(readyOp & SocketOperationRead)
1627
- {
1628
- if(_observer && !_readHeader)
1629
- {
1630
- _observer.startRead(_readStream);
1631
- }
1632
-
1633
- readOp = read(_readStream);
1634
- if(readOp & SocketOperationRead)
1635
- {
1636
- break;
1637
- }
1638
- if(_observer && !_readHeader)
1639
- {
1640
- assert(_readStream.i == _readStream.b.end());
1641
- _observer.finishRead(_readStream);
1642
- }
1643
-
1644
- if(_readHeader) // Read header if necessary.
1645
- {
1646
- _readHeader = false;
1647
-
1648
- if(_observer)
1649
- {
1650
- _observer->receivedBytes(static_cast<int>(headerSize));
1651
- }
1652
-
1653
- //
1654
- // Connection is validated on first message. This is only used by
1655
- // setState() to check wether or not we can print a connection
1656
- // warning (a client might close the connection forcefully if the
1657
- // connection isn't validated, we don't want to print a warning
1658
- // in this case).
1659
- //
1660
- _validated = true;
1661
-
1662
- ptrdiff_t pos = _readStream.i - _readStream.b.begin();
1663
- if(pos < headerSize)
1664
- {
1665
- //
1666
- // This situation is possible for small UDP packets.
1667
- //
1668
- throw IllegalMessageSizeException(__FILE__, __LINE__);
1669
- }
1670
-
1671
- _readStream.i = _readStream.b.begin();
1672
- const Byte* m;
1673
- _readStream.readBlob(m, static_cast<Int>(sizeof(magic)));
1674
- if(m[0] != magic[0] || m[1] != magic[1] || m[2] != magic[2] || m[3] != magic[3])
1675
- {
1676
- throw BadMagicException(__FILE__, __LINE__, "", Ice::ByteSeq(&m[0], &m[0] + sizeof(magic)));
1677
- }
1678
- ProtocolVersion pv;
1679
- _readStream.read(pv);
1680
- checkSupportedProtocol(pv);
1681
- EncodingVersion ev;
1682
- _readStream.read(ev);
1683
- checkSupportedProtocolEncoding(ev);
1684
-
1685
- Byte messageType;
1686
- _readStream.read(messageType);
1687
- Byte compressByte;
1688
- _readStream.read(compressByte);
1689
- Int size;
1690
- _readStream.read(size);
1691
- if(size < headerSize)
1692
- {
1693
- throw IllegalMessageSizeException(__FILE__, __LINE__);
1694
- }
1695
-
1696
- if(size > static_cast<Int>(_messageSizeMax))
1697
- {
1698
- Ex::throwMemoryLimitException(__FILE__, __LINE__, static_cast<size_t>(size), _messageSizeMax);
1699
- }
1700
- if(static_cast<size_t>(size) > _readStream.b.size())
1701
- {
1702
- _readStream.b.resize(static_cast<size_t>(size));
1703
- }
1704
- _readStream.i = _readStream.b.begin() + pos;
1705
- }
1706
-
1707
- if(_readStream.i != _readStream.b.end())
1708
- {
1709
- if(_endpoint->datagram())
1710
- {
1711
- throw DatagramLimitException(__FILE__, __LINE__); // The message was truncated.
1712
- }
1713
- continue;
1714
- }
1715
- break;
1716
- }
1717
-
1718
- SocketOperation newOp = static_cast<SocketOperation>(readOp | writeOp);
1719
- readyOp = static_cast<SocketOperation>(readyOp & ~newOp);
1720
- assert(readyOp || newOp);
1721
-
1722
- if(_state <= StateNotValidated)
1723
- {
1724
- if(newOp)
1725
- {
1726
- //
1727
- // Wait for all the transceiver conditions to be
1728
- // satisfied before continuing.
1729
- //
1730
- scheduleTimeout(newOp);
1731
- _threadPool->update(ICE_SHARED_FROM_THIS, current.operation, newOp);
1732
- return;
1733
- }
1734
-
1735
- if(_state == StateNotInitialized && !initialize(current.operation))
1736
- {
1737
- return;
1738
- }
1739
-
1740
- if(_state <= StateNotValidated && !validate(current.operation))
1741
- {
1742
- return;
1743
- }
1744
-
1745
- _threadPool->unregister(ICE_SHARED_FROM_THIS, current.operation);
1746
-
1747
- //
1748
- // We start out in holding state.
1749
- //
1750
- setState(StateHolding);
1751
- if(_startCallback)
1752
- {
1753
- swap(_startCallback, startCB);
1754
- if(startCB)
1755
- {
1756
- ++dispatchCount;
1757
- }
1758
- }
1759
- }
1760
- else
1761
- {
1762
- assert(_state <= StateClosingPending);
1763
-
1764
- //
1765
- // We parse messages first, if we receive a close
1766
- // connection message we won't send more messages.
1767
- //
1768
- if(readyOp & SocketOperationRead)
1769
- {
1770
- newOp = static_cast<SocketOperation>(newOp | parseMessage(current.stream,
1771
- invokeNum,
1772
- requestId,
1773
- compress,
1774
- servantManager,
1775
- adapter,
1776
- outAsync,
1777
- heartbeatCallback,
1778
- dispatchCount));
1779
- }
1780
-
1781
- if(readyOp & SocketOperationWrite)
1782
- {
1783
- newOp = static_cast<SocketOperation>(newOp | sendNextMessage(sentCBs));
1784
- if(!sentCBs.empty())
1785
- {
1786
- ++dispatchCount;
1787
- }
1788
- }
1789
-
1790
- if(_state < StateClosed)
1791
- {
1792
- scheduleTimeout(newOp);
1793
- _threadPool->update(ICE_SHARED_FROM_THIS, current.operation, newOp);
1794
- }
1795
- }
1796
-
1797
- if(_acmLastActivity != IceUtil::Time())
1798
- {
1799
- _acmLastActivity = IceUtil::Time::now(IceUtil::Time::Monotonic);
1800
- }
1801
-
1802
- if(dispatchCount == 0)
1803
- {
1804
- return; // Nothing to dispatch we're done!
1805
- }
1806
-
1807
- _dispatchCount += dispatchCount;
1808
- io.completed();
1809
- }
1810
- catch(const DatagramLimitException&) // Expected.
1811
- {
1812
- if(_warnUdp)
1813
- {
1814
- Warning out(_instance->initializationData().logger);
1815
- out << "maximum datagram size of " << _readStream.i - _readStream.b.begin() << " exceeded";
1816
- }
1817
- _readStream.resize(headerSize);
1818
- _readStream.i = _readStream.b.begin();
1819
- _readHeader = true;
1820
- return;
1821
- }
1822
- catch(const SocketException& ex)
1823
- {
1824
- setState(StateClosed, ex);
1825
- return;
1826
- }
1827
- catch(const LocalException& ex)
1828
- {
1829
- if(_endpoint->datagram())
1830
- {
1831
- if(_warn)
1832
- {
1833
- Warning out(_instance->initializationData().logger);
1834
- out << "datagram connection exception:\n" << ex << '\n' << _desc;
1835
- }
1836
- _readStream.resize(headerSize);
1837
- _readStream.i = _readStream.b.begin();
1838
- _readHeader = true;
1839
- }
1840
- else
1841
- {
1842
- setState(StateClosed, ex);
1843
- }
1844
- return;
1845
- }
1846
- }
1847
-
1848
- // dispatchFromThisThread dispatches to the correct DispatchQueue
1849
- #ifdef ICE_SWIFT
1850
- _threadPool->dispatchFromThisThread(new DispatchCall(ICE_SHARED_FROM_THIS, startCB, sentCBs, compress, requestId,
1851
- invokeNum, servantManager, adapter, outAsync,
1852
- heartbeatCallback, current.stream));
1853
- #else
1854
- if(!_dispatcher) // Optimization, call dispatch() directly if there's no dispatcher.
1855
- {
1856
- dispatch(startCB, sentCBs, compress, requestId, invokeNum, servantManager, adapter, outAsync, heartbeatCallback,
1857
- current.stream);
1858
- }
1859
- else
1860
- {
1861
- _threadPool->dispatchFromThisThread(new DispatchCall(ICE_SHARED_FROM_THIS, startCB, sentCBs, compress, requestId,
1862
- invokeNum, servantManager, adapter, outAsync,
1863
- heartbeatCallback, current.stream));
1864
-
1865
- }
1866
- #endif
1867
- }
1868
-
1869
- void
1870
- ConnectionI::dispatch(const StartCallbackPtr& startCB, const vector<OutgoingMessage>& sentCBs,
1871
- Byte compress, Int requestId, Int invokeNum, const ServantManagerPtr& servantManager,
1872
- const ObjectAdapterPtr& adapter, const OutgoingAsyncBasePtr& outAsync,
1873
- const ICE_DELEGATE(HeartbeatCallback)& heartbeatCallback, InputStream& stream)
1874
- {
1875
- int dispatchedCount = 0;
1876
-
1877
- //
1878
- // Notify the factory that the connection establishment and
1879
- // validation has completed.
1880
- //
1881
- if(startCB)
1882
- {
1883
- startCB->connectionStartCompleted(ICE_SHARED_FROM_THIS);
1884
- ++dispatchedCount;
1885
- }
1886
-
1887
- //
1888
- // Notify AMI calls that the message was sent.
1889
- //
1890
- if(!sentCBs.empty())
1891
- {
1892
- for(vector<OutgoingMessage>::const_iterator p = sentCBs.begin(); p != sentCBs.end(); ++p)
1893
- {
1894
- #if defined(ICE_USE_IOCP)
1895
- if(p->invokeSent)
1896
- {
1897
- p->outAsync->invokeSent();
1898
- }
1899
- if(p->receivedReply)
1900
- {
1901
- OutgoingAsyncPtr o = ICE_DYNAMIC_CAST(OutgoingAsync, p->outAsync);
1902
- if(o->response())
1903
- {
1904
- o->invokeResponse();
1905
- }
1906
- }
1907
- #else
1908
- p->outAsync->invokeSent();
1909
- #endif
1910
- }
1911
- ++dispatchedCount;
1912
- }
1913
-
1914
- //
1915
- // Asynchronous replies must be handled outside the thread
1916
- // synchronization, so that nested calls are possible.
1917
- //
1918
- if(outAsync)
1919
- {
1920
- outAsync->invokeResponse();
1921
- ++dispatchedCount;
1922
- }
1923
-
1924
- if(heartbeatCallback)
1925
- {
1926
- try
1927
- {
1928
- #ifdef ICE_CPP11_MAPPING
1929
- heartbeatCallback(ICE_SHARED_FROM_THIS);
1930
- #else
1931
- heartbeatCallback->heartbeat(ICE_SHARED_FROM_THIS);
1932
- #endif
1933
- }
1934
- catch(const std::exception& ex)
1935
- {
1936
- Error out(_instance->initializationData().logger);
1937
- out << "connection callback exception:\n" << ex << '\n' << _desc;
1938
- }
1939
- catch(...)
1940
- {
1941
- Error out(_instance->initializationData().logger);
1942
- out << "connection callback exception:\nunknown c++ exception" << '\n' << _desc;
1943
- }
1944
- ++dispatchedCount;
1945
- }
1946
-
1947
- //
1948
- // Method invocation (or multiple invocations for batch messages)
1949
- // must be done outside the thread synchronization, so that nested
1950
- // calls are possible.
1951
- //
1952
- if(invokeNum)
1953
- {
1954
- invokeAll(stream, invokeNum, requestId, compress, servantManager, adapter);
1955
-
1956
- //
1957
- // Don't increase count, the dispatch count is
1958
- // decreased when the incoming reply is sent.
1959
- //
1960
- }
1961
-
1962
- //
1963
- // Decrease dispatch count.
1964
- //
1965
- if(dispatchedCount > 0)
1966
- {
1967
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
1968
- _dispatchCount -= dispatchedCount;
1969
- if(_dispatchCount == 0)
1970
- {
1971
- //
1972
- // Only initiate shutdown if not already done. It might
1973
- // have already been done if the sent callback or AMI
1974
- // callback was dispatched when the connection was already
1975
- // in the closing state.
1976
- //
1977
- if(_state == StateClosing)
1978
- {
1979
- try
1980
- {
1981
- initiateShutdown();
1982
- }
1983
- catch(const LocalException& ex)
1984
- {
1985
- setState(StateClosed, ex);
1986
- }
1987
- }
1988
- else if(_state == StateFinished)
1989
- {
1990
- reap();
1991
- }
1992
- notifyAll();
1993
- }
1994
- }
1995
- }
1996
-
1997
- void
1998
- Ice::ConnectionI::finished(ThreadPoolCurrent& current, bool close)
1999
- {
2000
- {
2001
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
2002
- assert(_state == StateClosed);
2003
- unscheduleTimeout(static_cast<SocketOperation>(SocketOperationRead | SocketOperationWrite));
2004
- }
2005
-
2006
- //
2007
- // If there are no callbacks to call, we don't call ioCompleted() since we're not going
2008
- // to call code that will potentially block (this avoids promoting a new leader and
2009
- // unecessary thread creation, especially if this is called on shutdown).
2010
- //
2011
- if(!_startCallback && _sendStreams.empty() && _asyncRequests.empty() && !_closeCallback && !_heartbeatCallback)
2012
- {
2013
- finish(close);
2014
- return;
2015
- }
2016
-
2017
- current.ioCompleted();
2018
-
2019
- // dispatchFromThisThread dispatches to the correct DispatchQueue
2020
- #ifdef ICE_SWIFT
2021
- _threadPool->dispatchFromThisThread(new FinishCall(ICE_SHARED_FROM_THIS, close));
2022
- #else
2023
- if(!_dispatcher) // Optimization, call finish() directly if there's no dispatcher.
2024
- {
2025
- finish(close);
2026
- }
2027
- else
2028
- {
2029
- _threadPool->dispatchFromThisThread(new FinishCall(ICE_SHARED_FROM_THIS, close));
2030
- }
2031
- #endif
2032
- }
2033
-
2034
- void
2035
- Ice::ConnectionI::finish(bool close)
2036
- {
2037
- if(!_initialized)
2038
- {
2039
- if(_instance->traceLevels()->network >= 2)
2040
- {
2041
- string verb = _connector ? "establish" : "accept";
2042
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
2043
-
2044
- out << "failed to " << verb << " " << _endpoint->protocol() << " connection\n" << toString()
2045
- << "\n" << *_exception;
2046
- }
2047
- }
2048
- else
2049
- {
2050
- if(_instance->traceLevels()->network >= 1)
2051
- {
2052
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
2053
- out << "closed " << _endpoint->protocol() << " connection\n" << toString();
2054
-
2055
- if(!(dynamic_cast<const CloseConnectionException*>(_exception.get()) ||
2056
- dynamic_cast<const ConnectionManuallyClosedException*>(_exception.get()) ||
2057
- dynamic_cast<const ConnectionTimeoutException*>(_exception.get()) ||
2058
- dynamic_cast<const CommunicatorDestroyedException*>(_exception.get()) ||
2059
- dynamic_cast<const ObjectAdapterDeactivatedException*>(_exception.get())))
2060
- {
2061
- out << "\n" << *_exception;
2062
- }
2063
- }
2064
- }
2065
-
2066
- if(close)
2067
- {
2068
- try
2069
- {
2070
- _transceiver->close();
2071
- }
2072
- catch(const Ice::LocalException& ex)
2073
- {
2074
- Error out(_logger);
2075
- out << "unexpected connection exception:\n" << ex << '\n' << _desc;
2076
- }
2077
- }
2078
-
2079
- if(_startCallback)
2080
- {
2081
- assert(_exception);
2082
-
2083
- _startCallback->connectionStartFailed(ICE_SHARED_FROM_THIS, *_exception);
2084
- _startCallback = 0;
2085
- }
2086
-
2087
- if(!_sendStreams.empty())
2088
- {
2089
- if(!_writeStream.b.empty())
2090
- {
2091
- //
2092
- // Return the stream to the outgoing call. This is important for
2093
- // retriable AMI calls which are not marshalled again.
2094
- //
2095
- OutgoingMessage* message = &_sendStreams.front();
2096
- _writeStream.swap(*message->stream);
2097
-
2098
- #if defined(ICE_USE_IOCP)
2099
- //
2100
- // The current message might be sent but not yet removed from _sendStreams. If
2101
- // the response has been received in the meantime, we remove the message from
2102
- // _sendStreams to not call finished on a message which is already done.
2103
- //
2104
- if(message->isSent || message->receivedReply)
2105
- {
2106
- if(message->sent() && message->invokeSent)
2107
- {
2108
- message->outAsync->invokeSent();
2109
- }
2110
- if(message->receivedReply)
2111
- {
2112
- OutgoingAsyncPtr outAsync = ICE_DYNAMIC_CAST(OutgoingAsync, message->outAsync);
2113
- if(outAsync->response())
2114
- {
2115
- outAsync->invokeResponse();
2116
- }
2117
- }
2118
- _sendStreams.pop_front();
2119
- }
2120
- #endif
2121
- }
2122
-
2123
- for(deque<OutgoingMessage>::iterator o = _sendStreams.begin(); o != _sendStreams.end(); ++o)
2124
- {
2125
- o->completed(*_exception);
2126
- if(o->requestId) // Make sure finished isn't called twice.
2127
- {
2128
- _asyncRequests.erase(o->requestId);
2129
- }
2130
- }
2131
-
2132
- _sendStreams.clear();
2133
- }
2134
-
2135
- for(map<Int, OutgoingAsyncBasePtr>::const_iterator q = _asyncRequests.begin(); q != _asyncRequests.end(); ++q)
2136
- {
2137
- if(q->second->exception(*_exception))
2138
- {
2139
- q->second->invokeException();
2140
- }
2141
- }
2142
-
2143
- _asyncRequests.clear();
2144
-
2145
- //
2146
- // Don't wait to be reaped to reclaim memory allocated by read/write streams.
2147
- //
2148
- _writeStream.clear();
2149
- _writeStream.b.clear();
2150
- _readStream.clear();
2151
- _readStream.b.clear();
2152
-
2153
- if(_closeCallback)
2154
- {
2155
- closeCallback(_closeCallback);
2156
- _closeCallback = ICE_NULLPTR;
2157
- }
2158
-
2159
- _heartbeatCallback = ICE_NULLPTR;
2160
-
2161
- //
2162
- // This must be done last as this will cause waitUntilFinished() to return (and communicator
2163
- // objects such as the timer might be destroyed too).
2164
- //
2165
- {
2166
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
2167
- setState(StateFinished);
2168
-
2169
- if(_dispatchCount == 0)
2170
- {
2171
- reap();
2172
- }
2173
- }
2174
- }
2175
-
2176
- string
2177
- Ice::ConnectionI::toString() const ICE_NOEXCEPT
2178
- {
2179
- return _desc; // No mutex lock, _desc is immutable.
2180
- }
2181
-
2182
- NativeInfoPtr
2183
- Ice::ConnectionI::getNativeInfo()
2184
- {
2185
- return _transceiver->getNativeInfo();
2186
- }
2187
-
2188
- void
2189
- Ice::ConnectionI::timedOut()
2190
- {
2191
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
2192
- if(_state <= StateNotValidated)
2193
- {
2194
- setState(StateClosed, ConnectTimeoutException(__FILE__, __LINE__));
2195
- }
2196
- else if(_state < StateClosing)
2197
- {
2198
- setState(StateClosed, TimeoutException(__FILE__, __LINE__));
2199
- }
2200
- else if(_state < StateClosed)
2201
- {
2202
- setState(StateClosed, CloseTimeoutException(__FILE__, __LINE__));
2203
- }
2204
- }
2205
-
2206
- string
2207
- Ice::ConnectionI::type() const ICE_NOEXCEPT
2208
- {
2209
- return _type; // No mutex lock, _type is immutable.
2210
- }
2211
-
2212
- Ice::Int
2213
- Ice::ConnectionI::timeout() const ICE_NOEXCEPT
2214
- {
2215
- return _endpoint->timeout(); // No mutex lock, _endpoint is immutable.
2216
- }
2217
-
2218
- ConnectionInfoPtr
2219
- Ice::ConnectionI::getInfo() const
2220
- {
2221
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
2222
- if(_state >= StateClosed)
2223
- {
2224
- _exception->ice_throw();
2225
- }
2226
- return initConnectionInfo();
2227
- }
2228
-
2229
- void
2230
- Ice::ConnectionI::setBufferSize(Ice::Int rcvSize, Ice::Int sndSize)
2231
- {
2232
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
2233
- if(_state >= StateClosed)
2234
- {
2235
- _exception->ice_throw();
2236
- }
2237
- _transceiver->setBufferSize(rcvSize, sndSize);
2238
- _info = 0; // Invalidate the cached connection info
2239
- }
2240
-
2241
- void
2242
- Ice::ConnectionI::exception(const LocalException& ex)
2243
- {
2244
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
2245
- setState(StateClosed, ex);
2246
- }
2247
-
2248
- Ice::ConnectionI::ConnectionI(const CommunicatorPtr& communicator,
2249
- const InstancePtr& instance,
2250
- const ACMMonitorPtr& monitor,
2251
- const TransceiverPtr& transceiver,
2252
- const ConnectorPtr& connector,
2253
- const EndpointIPtr& endpoint,
2254
- const ObjectAdapterIPtr& adapter) :
2255
- _communicator(communicator),
2256
- _instance(instance),
2257
- _monitor(monitor),
2258
- _transceiver(transceiver),
2259
- _desc(transceiver->toString()),
2260
- _type(transceiver->protocol()),
2261
- _connector(connector),
2262
- _endpoint(endpoint),
2263
- _adapter(adapter),
2264
- _dispatcher(_instance->initializationData().dispatcher), // Cached for better performance.
2265
- _logger(_instance->initializationData().logger), // Cached for better performance.
2266
- _traceLevels(_instance->traceLevels()), // Cached for better performance.
2267
- _timer(_instance->timer()), // Cached for better performance.
2268
- _writeTimeout(new TimeoutCallback(this)),
2269
- _writeTimeoutScheduled(false),
2270
- _readTimeout(new TimeoutCallback(this)),
2271
- _readTimeoutScheduled(false),
2272
- _warn(_instance->initializationData().properties->getPropertyAsInt("Ice.Warn.Connections") > 0),
2273
- _warnUdp(_instance->initializationData().properties->getPropertyAsInt("Ice.Warn.Datagrams") > 0),
2274
- _compressionLevel(1),
2275
- _nextRequestId(1),
2276
- _asyncRequestsHint(_asyncRequests.end()),
2277
- _messageSizeMax(adapter ? adapter->messageSizeMax() : _instance->messageSizeMax()),
2278
- _batchRequestQueue(new BatchRequestQueue(instance, endpoint->datagram())),
2279
- _readStream(_instance.get(), Ice::currentProtocolEncoding),
2280
- _readHeader(false),
2281
- _writeStream(_instance.get(), Ice::currentProtocolEncoding),
2282
- _dispatchCount(0),
2283
- _state(StateNotInitialized),
2284
- _shutdownInitiated(false),
2285
- _initialized(false),
2286
- _validated(false)
2287
- {
2288
- const Ice::PropertiesPtr& properties = _instance->initializationData().properties;
2289
-
2290
- int& compressionLevel = const_cast<int&>(_compressionLevel);
2291
- compressionLevel = properties->getPropertyAsIntWithDefault("Ice.Compression.Level", 1);
2292
- if(compressionLevel < 1)
2293
- {
2294
- compressionLevel = 1;
2295
- }
2296
- else if(compressionLevel > 9)
2297
- {
2298
- compressionLevel = 9;
2299
- }
2300
-
2301
- if(adapter)
2302
- {
2303
- _servantManager = adapter->getServantManager();
2304
- }
2305
-
2306
- if(_monitor && _monitor->getACM().timeout > 0)
2307
- {
2308
- _acmLastActivity = IceUtil::Time::now(IceUtil::Time::Monotonic);
2309
- }
2310
- }
2311
-
2312
- Ice::ConnectionIPtr
2313
- Ice::ConnectionI::create(const CommunicatorPtr& communicator,
2314
- const InstancePtr& instance,
2315
- const ACMMonitorPtr& monitor,
2316
- const TransceiverPtr& transceiver,
2317
- const ConnectorPtr& connector,
2318
- const EndpointIPtr& endpoint,
2319
- const ObjectAdapterIPtr& adapter)
2320
- {
2321
- Ice::ConnectionIPtr conn(new ConnectionI(communicator, instance, monitor, transceiver, connector,
2322
- endpoint, adapter));
2323
- if(adapter)
2324
- {
2325
- const_cast<ThreadPoolPtr&>(conn->_threadPool) = adapter->getThreadPool();
2326
- }
2327
- else
2328
- {
2329
- const_cast<ThreadPoolPtr&>(conn->_threadPool) = conn->_instance->clientThreadPool();
2330
- }
2331
- conn->_threadPool->initialize(conn);
2332
- return conn;
2333
- }
2334
-
2335
- Ice::ConnectionI::~ConnectionI()
2336
- {
2337
- assert(!_startCallback);
2338
- assert(!_closeCallback);
2339
- assert(!_heartbeatCallback);
2340
- assert(_state == StateFinished);
2341
- assert(_dispatchCount == 0);
2342
- assert(_sendStreams.empty());
2343
- assert(_asyncRequests.empty());
2344
- }
2345
-
2346
- void
2347
- Ice::ConnectionI::setState(State state, const LocalException& ex)
2348
- {
2349
- //
2350
- // If setState() is called with an exception, then only closed and
2351
- // closing states are permissible.
2352
- //
2353
- assert(state >= StateClosing);
2354
-
2355
- if(_state == state) // Don't switch twice.
2356
- {
2357
- return;
2358
- }
2359
-
2360
- if(!_exception)
2361
- {
2362
- //
2363
- // If we are in closed state, an exception must be set.
2364
- //
2365
- assert(_state != StateClosed);
2366
- ICE_SET_EXCEPTION_FROM_CLONE(_exception, ex.ice_clone());
2367
- //
2368
- // We don't warn if we are not validated.
2369
- //
2370
- if(_warn && _validated)
2371
- {
2372
- //
2373
- // Don't warn about certain expected exceptions.
2374
- //
2375
- if(!(dynamic_cast<const CloseConnectionException*>(&ex) ||
2376
- dynamic_cast<const ConnectionManuallyClosedException*>(&ex) ||
2377
- dynamic_cast<const ConnectionTimeoutException*>(&ex) ||
2378
- dynamic_cast<const CommunicatorDestroyedException*>(&ex) ||
2379
- dynamic_cast<const ObjectAdapterDeactivatedException*>(&ex) ||
2380
- (dynamic_cast<const ConnectionLostException*>(&ex) && _state >= StateClosing)))
2381
- {
2382
- Warning out(_logger);
2383
- out << "connection exception:\n" << ex << '\n' << _desc;
2384
- }
2385
- }
2386
- }
2387
-
2388
- //
2389
- // We must set the new state before we notify requests of any
2390
- // exceptions. Otherwise new requests may retry on a connection
2391
- // that is not yet marked as closed or closing.
2392
- //
2393
- setState(state);
2394
- }
2395
-
2396
- void
2397
- Ice::ConnectionI::setState(State state)
2398
- {
2399
- //
2400
- // We don't want to send close connection messages if the endpoint
2401
- // only supports oneway transmission from client to server.
2402
- //
2403
- if(_endpoint->datagram() && state == StateClosing)
2404
- {
2405
- state = StateClosed;
2406
- }
2407
-
2408
- //
2409
- // Skip graceful shutdown if we are destroyed before validation.
2410
- //
2411
- if(_state <= StateNotValidated && state == StateClosing)
2412
- {
2413
- state = StateClosed;
2414
- }
2415
-
2416
- if(_state == state) // Don't switch twice.
2417
- {
2418
- return;
2419
- }
2420
-
2421
- try
2422
- {
2423
- switch(state)
2424
- {
2425
- case StateNotInitialized:
2426
- {
2427
- assert(false);
2428
- break;
2429
- }
2430
-
2431
- case StateNotValidated:
2432
- {
2433
- if(_state != StateNotInitialized)
2434
- {
2435
- assert(_state == StateClosed);
2436
- return;
2437
- }
2438
- break;
2439
- }
2440
-
2441
- case StateActive:
2442
- {
2443
- //
2444
- // Can only switch from holding or not validated to
2445
- // active.
2446
- //
2447
- if(_state != StateHolding && _state != StateNotValidated)
2448
- {
2449
- return;
2450
- }
2451
- _threadPool->_register(ICE_SHARED_FROM_THIS, SocketOperationRead);
2452
- break;
2453
- }
2454
-
2455
- case StateHolding:
2456
- {
2457
- //
2458
- // Can only switch from active or not validated to
2459
- // holding.
2460
- //
2461
- if(_state != StateActive && _state != StateNotValidated)
2462
- {
2463
- return;
2464
- }
2465
- if(_state == StateActive)
2466
- {
2467
- _threadPool->unregister(ICE_SHARED_FROM_THIS, SocketOperationRead);
2468
- }
2469
- break;
2470
- }
2471
-
2472
- case StateClosing:
2473
- case StateClosingPending:
2474
- {
2475
- //
2476
- // Can't change back from closing pending.
2477
- //
2478
- if(_state >= StateClosingPending)
2479
- {
2480
- return;
2481
- }
2482
- break;
2483
- }
2484
-
2485
- case StateClosed:
2486
- {
2487
- if(_state == StateFinished)
2488
- {
2489
- return;
2490
- }
2491
-
2492
- _batchRequestQueue->destroy(*_exception);
2493
-
2494
- //
2495
- // Don't need to close now for connections so only close the transceiver
2496
- // if the selector request it.
2497
- //
2498
- if(_threadPool->finish(ICE_SHARED_FROM_THIS, false))
2499
- {
2500
- _transceiver->close();
2501
- }
2502
- break;
2503
- }
2504
-
2505
- case StateFinished:
2506
- {
2507
- assert(_state == StateClosed);
2508
- _communicator = 0;
2509
- break;
2510
- }
2511
- }
2512
- }
2513
- catch(const Ice::LocalException& ex)
2514
- {
2515
- Error out(_logger);
2516
- out << "unexpected connection exception:\n" << ex << '\n' << _desc;
2517
- }
2518
-
2519
- //
2520
- // We only register with the connection monitor if our new state
2521
- // is StateActive. Otherwise we unregister with the connection
2522
- // monitor, but only if we were registered before, i.e., if our
2523
- // old state was StateActive.
2524
- //
2525
- if(_monitor)
2526
- {
2527
- if(state == StateActive)
2528
- {
2529
- if(_acmLastActivity != IceUtil::Time())
2530
- {
2531
- _acmLastActivity = IceUtil::Time::now(IceUtil::Time::Monotonic);
2532
- }
2533
- _monitor->add(ICE_SHARED_FROM_THIS);
2534
- }
2535
- else if(_state == StateActive)
2536
- {
2537
- _monitor->remove(ICE_SHARED_FROM_THIS);
2538
- }
2539
- }
2540
-
2541
- if(_instance->initializationData().observer)
2542
- {
2543
- ConnectionState oldState = toConnectionState(_state);
2544
- ConnectionState newState = toConnectionState(state);
2545
- if(oldState != newState)
2546
- {
2547
- _observer.attach(_instance->initializationData().observer->getConnectionObserver(initConnectionInfo(),
2548
- _endpoint,
2549
- newState,
2550
- _observer.get()));
2551
- }
2552
- if(_observer && state == StateClosed && _exception)
2553
- {
2554
- if(!(dynamic_cast<const CloseConnectionException*>(_exception.get()) ||
2555
- dynamic_cast<const ConnectionManuallyClosedException*>(_exception.get()) ||
2556
- dynamic_cast<const ConnectionTimeoutException*>(_exception.get()) ||
2557
- dynamic_cast<const CommunicatorDestroyedException*>(_exception.get()) ||
2558
- dynamic_cast<const ObjectAdapterDeactivatedException*>(_exception.get()) ||
2559
- (dynamic_cast<const ConnectionLostException*>(_exception.get()) && _state >= StateClosing)))
2560
- {
2561
- _observer->failed(_exception->ice_id());
2562
- }
2563
- }
2564
- }
2565
- _state = state;
2566
-
2567
- notifyAll();
2568
-
2569
- if(_state == StateClosing && _dispatchCount == 0)
2570
- {
2571
- try
2572
- {
2573
- initiateShutdown();
2574
- }
2575
- catch(const LocalException& ex)
2576
- {
2577
- setState(StateClosed, ex);
2578
- }
2579
- }
2580
- }
2581
-
2582
- void
2583
- Ice::ConnectionI::initiateShutdown()
2584
- {
2585
- assert(_state == StateClosing && _dispatchCount == 0);
2586
-
2587
- if(_shutdownInitiated)
2588
- {
2589
- return;
2590
- }
2591
- _shutdownInitiated = true;
2592
-
2593
- if(!_endpoint->datagram())
2594
- {
2595
- //
2596
- // Before we shut down, we send a close connection message.
2597
- //
2598
- OutputStream os(_instance.get(), Ice::currentProtocolEncoding);
2599
- os.write(magic[0]);
2600
- os.write(magic[1]);
2601
- os.write(magic[2]);
2602
- os.write(magic[3]);
2603
- os.write(currentProtocol);
2604
- os.write(currentProtocolEncoding);
2605
- os.write(closeConnectionMsg);
2606
- os.write(static_cast<Byte>(1)); // compression status: compression supported but not used.
2607
- os.write(headerSize); // Message size.
2608
-
2609
- OutgoingMessage message(&os, false);
2610
- if(sendMessage(message) & AsyncStatusSent)
2611
- {
2612
- setState(StateClosingPending);
2613
-
2614
- //
2615
- // Notify the transceiver of the graceful connection closure.
2616
- //
2617
- SocketOperation op = _transceiver->closing(true, *_exception);
2618
- if(op)
2619
- {
2620
- scheduleTimeout(op);
2621
- _threadPool->_register(ICE_SHARED_FROM_THIS, op);
2622
- }
2623
- }
2624
- }
2625
- }
2626
-
2627
- void
2628
- Ice::ConnectionI::sendHeartbeatNow()
2629
- {
2630
- assert(_state == StateActive);
2631
-
2632
- if(!_endpoint->datagram())
2633
- {
2634
- OutputStream os(_instance.get(), Ice::currentProtocolEncoding);
2635
- os.write(magic[0]);
2636
- os.write(magic[1]);
2637
- os.write(magic[2]);
2638
- os.write(magic[3]);
2639
- os.write(currentProtocol);
2640
- os.write(currentProtocolEncoding);
2641
- os.write(validateConnectionMsg);
2642
- os.write(static_cast<Byte>(0)); // Compression status (always zero for validate connection).
2643
- os.write(headerSize); // Message size.
2644
- os.i = os.b.begin();
2645
- try
2646
- {
2647
- OutgoingMessage message(&os, false);
2648
- sendMessage(message);
2649
- }
2650
- catch(const LocalException& ex)
2651
- {
2652
- setState(StateClosed, ex);
2653
- assert(_exception);
2654
- }
2655
- }
2656
- }
2657
-
2658
- bool
2659
- Ice::ConnectionI::initialize(SocketOperation operation)
2660
- {
2661
- SocketOperation s = _transceiver->initialize(_readStream, _writeStream);
2662
- if(s != SocketOperationNone)
2663
- {
2664
- scheduleTimeout(s);
2665
- _threadPool->update(ICE_SHARED_FROM_THIS, operation, s);
2666
- return false;
2667
- }
2668
-
2669
- //
2670
- // Update the connection description once the transceiver is initialized.
2671
- //
2672
- const_cast<string&>(_desc) = _transceiver->toString();
2673
- _initialized = true;
2674
- setState(StateNotValidated);
2675
- return true;
2676
- }
2677
-
2678
- bool
2679
- Ice::ConnectionI::validate(SocketOperation operation)
2680
- {
2681
- if(!_endpoint->datagram()) // Datagram connections are always implicitly validated.
2682
- {
2683
- if(_adapter) // The server side has the active role for connection validation.
2684
- {
2685
- if(_writeStream.b.empty())
2686
- {
2687
- _writeStream.write(magic[0]);
2688
- _writeStream.write(magic[1]);
2689
- _writeStream.write(magic[2]);
2690
- _writeStream.write(magic[3]);
2691
- _writeStream.write(currentProtocol);
2692
- _writeStream.write(currentProtocolEncoding);
2693
- _writeStream.write(validateConnectionMsg);
2694
- _writeStream.write(static_cast<Byte>(0)); // Compression status (always zero for validate connection).
2695
- _writeStream.write(headerSize); // Message size.
2696
- _writeStream.i = _writeStream.b.begin();
2697
- traceSend(_writeStream, _logger, _traceLevels);
2698
- }
2699
-
2700
- if(_observer)
2701
- {
2702
- _observer.startWrite(_writeStream);
2703
- }
2704
-
2705
- if(_writeStream.i != _writeStream.b.end())
2706
- {
2707
- SocketOperation op = write(_writeStream);
2708
- if(op)
2709
- {
2710
- scheduleTimeout(op);
2711
- _threadPool->update(ICE_SHARED_FROM_THIS, operation, op);
2712
- return false;
2713
- }
2714
- }
2715
-
2716
- if(_observer)
2717
- {
2718
- _observer.finishWrite(_writeStream);
2719
- }
2720
- }
2721
- else // The client side has the passive role for connection validation.
2722
- {
2723
- if(_readStream.b.empty())
2724
- {
2725
- _readStream.b.resize(headerSize);
2726
- _readStream.i = _readStream.b.begin();
2727
- }
2728
-
2729
- if(_observer)
2730
- {
2731
- _observer.startRead(_readStream);
2732
- }
2733
-
2734
- if(_readStream.i != _readStream.b.end())
2735
- {
2736
- SocketOperation op = read(_readStream);
2737
- if(op)
2738
- {
2739
- scheduleTimeout(op);
2740
- _threadPool->update(ICE_SHARED_FROM_THIS, operation, op);
2741
- return false;
2742
- }
2743
- }
2744
-
2745
- if(_observer)
2746
- {
2747
- _observer.finishRead(_readStream);
2748
- }
2749
-
2750
- _validated = true;
2751
-
2752
- assert(_readStream.i == _readStream.b.end());
2753
- _readStream.i = _readStream.b.begin();
2754
- Byte m[4];
2755
- _readStream.read(m[0]);
2756
- _readStream.read(m[1]);
2757
- _readStream.read(m[2]);
2758
- _readStream.read(m[3]);
2759
- if(m[0] != magic[0] || m[1] != magic[1] || m[2] != magic[2] || m[3] != magic[3])
2760
- {
2761
- throw BadMagicException(__FILE__, __LINE__, "", Ice::ByteSeq(&m[0], &m[0] + sizeof(magic)));
2762
- }
2763
- ProtocolVersion pv;
2764
- _readStream.read(pv);
2765
- checkSupportedProtocol(pv);
2766
- EncodingVersion ev;
2767
- _readStream.read(ev);
2768
- checkSupportedProtocolEncoding(ev);
2769
- Byte messageType;
2770
- _readStream.read(messageType);
2771
- if(messageType != validateConnectionMsg)
2772
- {
2773
- throw ConnectionNotValidatedException(__FILE__, __LINE__);
2774
- }
2775
- Byte compress;
2776
- _readStream.read(compress); // Ignore compression status for validate connection.
2777
- Int size;
2778
- _readStream.read(size);
2779
- if(size != headerSize)
2780
- {
2781
- throw IllegalMessageSizeException(__FILE__, __LINE__);
2782
- }
2783
- traceRecv(_readStream, _logger, _traceLevels);
2784
- }
2785
- }
2786
-
2787
- _writeStream.resize(0);
2788
- _writeStream.i = _writeStream.b.begin();
2789
-
2790
- _readStream.resize(headerSize);
2791
- _readStream.i = _readStream.b.begin();
2792
- _readHeader = true;
2793
-
2794
- if(_instance->traceLevels()->network >= 1)
2795
- {
2796
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
2797
- if(_endpoint->datagram())
2798
- {
2799
- out << "starting to " << (_connector ? "send" : "receive") << " " << _endpoint->protocol() << " messages\n";
2800
- out << _transceiver->toDetailedString();
2801
- }
2802
- else
2803
- {
2804
- out << (_connector ? "established" : "accepted") << " " << _endpoint->protocol() << " connection\n";
2805
- out << toString();
2806
- }
2807
- }
2808
-
2809
- return true;
2810
- }
2811
-
2812
- SocketOperation
2813
- Ice::ConnectionI::sendNextMessage(vector<OutgoingMessage>& callbacks)
2814
- {
2815
- if(_sendStreams.empty())
2816
- {
2817
- return SocketOperationNone;
2818
- }
2819
- else if(_state == StateClosingPending && _writeStream.i == _writeStream.b.begin())
2820
- {
2821
- // Message wasn't sent, empty the _writeStream, we're not going to send more data.
2822
- OutgoingMessage* message = &_sendStreams.front();
2823
- _writeStream.swap(*message->stream);
2824
- return SocketOperationNone;
2825
- }
2826
-
2827
- assert(!_writeStream.b.empty() && _writeStream.i == _writeStream.b.end());
2828
- try
2829
- {
2830
- while(true)
2831
- {
2832
- //
2833
- // Notify the message that it was sent.
2834
- //
2835
- OutgoingMessage* message = &_sendStreams.front();
2836
- if(message->stream)
2837
- {
2838
- _writeStream.swap(*message->stream);
2839
- if(message->sent())
2840
- {
2841
- callbacks.push_back(*message);
2842
- }
2843
- }
2844
- _sendStreams.pop_front();
2845
-
2846
- //
2847
- // If there's nothing left to send, we're done.
2848
- //
2849
- if(_sendStreams.empty())
2850
- {
2851
- break;
2852
- }
2853
-
2854
- //
2855
- // If we are in the closed state or if the close is
2856
- // pending, don't continue sending.
2857
- //
2858
- // This can occur if parseMessage (called before
2859
- // sendNextMessage by message()) closes the connection.
2860
- //
2861
- if(_state >= StateClosingPending)
2862
- {
2863
- return SocketOperationNone;
2864
- }
2865
-
2866
- //
2867
- // Otherwise, prepare the next message stream for writing.
2868
- //
2869
- message = &_sendStreams.front();
2870
- assert(!message->stream->i);
2871
- #ifdef ICE_HAS_BZIP2
2872
- if(message->compress && message->stream->b.size() >= 100) // Only compress messages > 100 bytes.
2873
- {
2874
- //
2875
- // Message compressed. Request compressed response, if any.
2876
- //
2877
- message->stream->b[9] = 2;
2878
-
2879
- //
2880
- // Do compression.
2881
- //
2882
- OutputStream stream(_instance.get(), Ice::currentProtocolEncoding);
2883
- doCompress(*message->stream, stream);
2884
-
2885
- traceSend(*message->stream, _logger, _traceLevels);
2886
-
2887
- message->adopt(&stream); // Adopt the compressed stream.
2888
- message->stream->i = message->stream->b.begin();
2889
- }
2890
- else
2891
- {
2892
- #endif
2893
- if(message->compress)
2894
- {
2895
- //
2896
- // Message not compressed. Request compressed response, if any.
2897
- //
2898
- message->stream->b[9] = 1;
2899
- }
2900
-
2901
- //
2902
- // No compression, just fill in the message size.
2903
- //
2904
- Int sz = static_cast<Int>(message->stream->b.size());
2905
- const Byte* p = reinterpret_cast<const Byte*>(&sz);
2906
- #ifdef ICE_BIG_ENDIAN
2907
- reverse_copy(p, p + sizeof(Int), message->stream->b.begin() + 10);
2908
- #else
2909
- copy(p, p + sizeof(Int), message->stream->b.begin() + 10);
2910
- #endif
2911
- message->stream->i = message->stream->b.begin();
2912
- traceSend(*message->stream, _logger, _traceLevels);
2913
-
2914
- #ifdef ICE_HAS_BZIP2
2915
- }
2916
- #endif
2917
- _writeStream.swap(*message->stream);
2918
-
2919
- //
2920
- // Send the message.
2921
- //
2922
- if(_observer)
2923
- {
2924
- _observer.startWrite(_writeStream);
2925
- }
2926
- assert(_writeStream.i);
2927
- if(_writeStream.i != _writeStream.b.end())
2928
- {
2929
- SocketOperation op = write(_writeStream);
2930
- if(op)
2931
- {
2932
- return op;
2933
- }
2934
- }
2935
- if(_observer)
2936
- {
2937
- _observer.finishWrite(_writeStream);
2938
- }
2939
- }
2940
-
2941
- //
2942
- // If all the messages were sent and we are in the closing state, we schedule
2943
- // the close timeout to wait for the peer to close the connection.
2944
- //
2945
- if(_state == StateClosing && _shutdownInitiated)
2946
- {
2947
- setState(StateClosingPending);
2948
- SocketOperation op = _transceiver->closing(true, *_exception);
2949
- if(op)
2950
- {
2951
- return op;
2952
- }
2953
- }
2954
- }
2955
- catch(const Ice::LocalException& ex)
2956
- {
2957
- setState(StateClosed, ex);
2958
- }
2959
- return SocketOperationNone;
2960
- }
2961
-
2962
- AsyncStatus
2963
- Ice::ConnectionI::sendMessage(OutgoingMessage& message)
2964
- {
2965
- assert(_state < StateClosed);
2966
-
2967
- message.stream->i = 0; // Reset the message stream iterator before starting sending the message.
2968
-
2969
- if(!_sendStreams.empty())
2970
- {
2971
- _sendStreams.push_back(message);
2972
- _sendStreams.back().adopt(0);
2973
- return AsyncStatusQueued;
2974
- }
2975
-
2976
- //
2977
- // Attempt to send the message without blocking. If the send blocks, we register
2978
- // the connection with the selector thread.
2979
- //
2980
-
2981
- message.stream->i = message.stream->b.begin();
2982
- SocketOperation op;
2983
- #ifdef ICE_HAS_BZIP2
2984
- if(message.compress && message.stream->b.size() >= 100) // Only compress messages larger than 100 bytes.
2985
- {
2986
- //
2987
- // Message compressed. Request compressed response, if any.
2988
- //
2989
- message.stream->b[9] = 2;
2990
-
2991
- //
2992
- // Do compression.
2993
- //
2994
- OutputStream stream(_instance.get(), Ice::currentProtocolEncoding);
2995
- doCompress(*message.stream, stream);
2996
- stream.i = stream.b.begin();
2997
-
2998
- traceSend(*message.stream, _logger, _traceLevels);
2999
-
3000
- //
3001
- // Send the message without blocking.
3002
- //
3003
- if(_observer)
3004
- {
3005
- _observer.startWrite(stream);
3006
- }
3007
- op = write(stream);
3008
- if(!op)
3009
- {
3010
- if(_observer)
3011
- {
3012
- _observer.finishWrite(stream);
3013
- }
3014
-
3015
- AsyncStatus status = AsyncStatusSent;
3016
- if(message.sent())
3017
- {
3018
- status = static_cast<AsyncStatus>(status | AsyncStatusInvokeSentCallback);
3019
- }
3020
- if(_acmLastActivity != IceUtil::Time())
3021
- {
3022
- _acmLastActivity = IceUtil::Time::now(IceUtil::Time::Monotonic);
3023
- }
3024
- return status;
3025
- }
3026
-
3027
- _sendStreams.push_back(message);
3028
- _sendStreams.back().adopt(&stream);
3029
- }
3030
- else
3031
- {
3032
- #endif
3033
- if(message.compress)
3034
- {
3035
- //
3036
- // Message not compressed. Request compressed response, if any.
3037
- //
3038
- message.stream->b[9] = 1;
3039
- }
3040
-
3041
- //
3042
- // No compression, just fill in the message size.
3043
- //
3044
- Int sz = static_cast<Int>(message.stream->b.size());
3045
- const Byte* p = reinterpret_cast<const Byte*>(&sz);
3046
- #ifdef ICE_BIG_ENDIAN
3047
- reverse_copy(p, p + sizeof(Int), message.stream->b.begin() + 10);
3048
- #else
3049
- copy(p, p + sizeof(Int), message.stream->b.begin() + 10);
3050
- #endif
3051
- message.stream->i = message.stream->b.begin();
3052
-
3053
- traceSend(*message.stream, _logger, _traceLevels);
3054
-
3055
- //
3056
- // Send the message without blocking.
3057
- //
3058
- if(_observer)
3059
- {
3060
- _observer.startWrite(*message.stream);
3061
- }
3062
- op = write(*message.stream);
3063
- if(!op)
3064
- {
3065
- if(_observer)
3066
- {
3067
- _observer.finishWrite(*message.stream);
3068
- }
3069
- AsyncStatus status = AsyncStatusSent;
3070
- if(message.sent())
3071
- {
3072
- status = static_cast<AsyncStatus>(status | AsyncStatusInvokeSentCallback);
3073
- }
3074
- if(_acmLastActivity != IceUtil::Time())
3075
- {
3076
- _acmLastActivity = IceUtil::Time::now(IceUtil::Time::Monotonic);
3077
- }
3078
- return status;
3079
- }
3080
-
3081
- _sendStreams.push_back(message);
3082
- _sendStreams.back().adopt(0); // Adopt the stream.
3083
- #ifdef ICE_HAS_BZIP2
3084
- }
3085
- #endif
3086
-
3087
- _writeStream.swap(*_sendStreams.back().stream);
3088
- scheduleTimeout(op);
3089
- _threadPool->_register(ICE_SHARED_FROM_THIS, op);
3090
- return AsyncStatusQueued;
3091
- }
3092
-
3093
- #ifdef ICE_HAS_BZIP2
3094
- static string
3095
- getBZ2Error(int bzError)
3096
- {
3097
- if(bzError == BZ_RUN_OK)
3098
- {
3099
- return ": BZ_RUN_OK";
3100
- }
3101
- else if(bzError == BZ_FLUSH_OK)
3102
- {
3103
- return ": BZ_FLUSH_OK";
3104
- }
3105
- else if(bzError == BZ_FINISH_OK)
3106
- {
3107
- return ": BZ_FINISH_OK";
3108
- }
3109
- else if(bzError == BZ_STREAM_END)
3110
- {
3111
- return ": BZ_STREAM_END";
3112
- }
3113
- else if(bzError == BZ_CONFIG_ERROR)
3114
- {
3115
- return ": BZ_CONFIG_ERROR";
3116
- }
3117
- else if(bzError == BZ_SEQUENCE_ERROR)
3118
- {
3119
- return ": BZ_SEQUENCE_ERROR";
3120
- }
3121
- else if(bzError == BZ_PARAM_ERROR)
3122
- {
3123
- return ": BZ_PARAM_ERROR";
3124
- }
3125
- else if(bzError == BZ_MEM_ERROR)
3126
- {
3127
- return ": BZ_MEM_ERROR";
3128
- }
3129
- else if(bzError == BZ_DATA_ERROR)
3130
- {
3131
- return ": BZ_DATA_ERROR";
3132
- }
3133
- else if(bzError == BZ_DATA_ERROR_MAGIC)
3134
- {
3135
- return ": BZ_DATA_ERROR_MAGIC";
3136
- }
3137
- else if(bzError == BZ_IO_ERROR)
3138
- {
3139
- return ": BZ_IO_ERROR";
3140
- }
3141
- else if(bzError == BZ_UNEXPECTED_EOF)
3142
- {
3143
- return ": BZ_UNEXPECTED_EOF";
3144
- }
3145
- else if(bzError == BZ_OUTBUFF_FULL)
3146
- {
3147
- return ": BZ_OUTBUFF_FULL";
3148
- }
3149
- else
3150
- {
3151
- return "";
3152
- }
3153
- }
3154
-
3155
- void
3156
- Ice::ConnectionI::doCompress(OutputStream& uncompressed, OutputStream& compressed)
3157
- {
3158
- const Byte* p;
3159
-
3160
- //
3161
- // Compress the message body, but not the header.
3162
- //
3163
- unsigned int uncompressedLen = static_cast<unsigned int>(uncompressed.b.size() - headerSize);
3164
- unsigned int compressedLen = static_cast<unsigned int>(uncompressedLen * 1.01 + 600);
3165
- compressed.b.resize(headerSize + sizeof(Int) + compressedLen);
3166
- int bzError = BZ2_bzBuffToBuffCompress(reinterpret_cast<char*>(&compressed.b[0]) + headerSize + sizeof(Int),
3167
- &compressedLen,
3168
- reinterpret_cast<char*>(&uncompressed.b[0]) + headerSize,
3169
- uncompressedLen,
3170
- _compressionLevel, 0, 0);
3171
- if(bzError != BZ_OK)
3172
- {
3173
- throw CompressionException(__FILE__, __LINE__, "BZ2_bzBuffToBuffCompress failed" + getBZ2Error(bzError));
3174
- }
3175
- compressed.b.resize(headerSize + sizeof(Int) + compressedLen);
3176
-
3177
- //
3178
- // Write the size of the compressed stream into the header of the
3179
- // uncompressed stream. Since the header will be copied, this size
3180
- // will also be in the header of the compressed stream.
3181
- //
3182
- Int compressedSize = static_cast<Int>(compressed.b.size());
3183
- p = reinterpret_cast<const Byte*>(&compressedSize);
3184
- #ifdef ICE_BIG_ENDIAN
3185
- reverse_copy(p, p + sizeof(Int), uncompressed.b.begin() + 10);
3186
- #else
3187
- copy(p, p + sizeof(Int), uncompressed.b.begin() + 10);
3188
- #endif
3189
-
3190
- //
3191
- // Add the size of the uncompressed stream before the message body
3192
- // of the compressed stream.
3193
- //
3194
- Int uncompressedSize = static_cast<Int>(uncompressed.b.size());
3195
- p = reinterpret_cast<const Byte*>(&uncompressedSize);
3196
- #ifdef ICE_BIG_ENDIAN
3197
- reverse_copy(p, p + sizeof(Int), compressed.b.begin() + headerSize);
3198
- #else
3199
- copy(p, p + sizeof(Int), compressed.b.begin() + headerSize);
3200
- #endif
3201
-
3202
- //
3203
- // Copy the header from the uncompressed stream to the compressed one.
3204
- //
3205
- copy(uncompressed.b.begin(), uncompressed.b.begin() + headerSize, compressed.b.begin());
3206
- }
3207
-
3208
- void
3209
- Ice::ConnectionI::doUncompress(InputStream& compressed, InputStream& uncompressed)
3210
- {
3211
- Int uncompressedSize;
3212
- compressed.i = compressed.b.begin() + headerSize;
3213
- compressed.read(uncompressedSize);
3214
- if(uncompressedSize <= headerSize)
3215
- {
3216
- throw IllegalMessageSizeException(__FILE__, __LINE__);
3217
- }
3218
-
3219
- if(uncompressedSize > static_cast<Int>(_messageSizeMax))
3220
- {
3221
- Ex::throwMemoryLimitException(__FILE__, __LINE__, static_cast<size_t>(uncompressedSize), _messageSizeMax);
3222
- }
3223
- uncompressed.resize(static_cast<size_t>(uncompressedSize));
3224
-
3225
- unsigned int uncompressedLen = static_cast<unsigned int>(uncompressedSize - headerSize);
3226
- unsigned int compressedLen = static_cast<unsigned int>(compressed.b.size() - headerSize - sizeof(Int));
3227
- int bzError = BZ2_bzBuffToBuffDecompress(reinterpret_cast<char*>(&uncompressed.b[0]) + headerSize,
3228
- &uncompressedLen,
3229
- reinterpret_cast<char*>(&compressed.b[0]) + headerSize + sizeof(Int),
3230
- compressedLen,
3231
- 0, 0);
3232
- if(bzError != BZ_OK)
3233
- {
3234
- throw CompressionException(__FILE__, __LINE__, "BZ2_bzBuffToBuffCompress failed" + getBZ2Error(bzError));
3235
- }
3236
-
3237
- copy(compressed.b.begin(), compressed.b.begin() + headerSize, uncompressed.b.begin());
3238
- }
3239
- #endif
3240
-
3241
- SocketOperation
3242
- Ice::ConnectionI::parseMessage(InputStream& stream, Int& invokeNum, Int& requestId, Byte& compress,
3243
- ServantManagerPtr& servantManager, ObjectAdapterPtr& adapter,
3244
- OutgoingAsyncBasePtr& outAsync, ICE_DELEGATE(HeartbeatCallback)& heartbeatCallback,
3245
- int& dispatchCount)
3246
- {
3247
- assert(_state > StateNotValidated && _state < StateClosed);
3248
-
3249
- _readStream.swap(stream);
3250
- _readStream.resize(headerSize);
3251
- _readStream.i = _readStream.b.begin();
3252
- _readHeader = true;
3253
-
3254
- assert(stream.i == stream.b.end());
3255
-
3256
- try
3257
- {
3258
- //
3259
- // We don't need to check magic and version here. This has
3260
- // already been done by the ThreadPool, which provides us
3261
- // with the stream.
3262
- //
3263
- assert(stream.i == stream.b.end());
3264
- stream.i = stream.b.begin() + 8;
3265
- Byte messageType;
3266
- stream.read(messageType);
3267
- stream.read(compress);
3268
-
3269
- if(compress == 2)
3270
- {
3271
- #ifdef ICE_HAS_BZIP2
3272
- InputStream ustream(_instance.get(), Ice::currentProtocolEncoding);
3273
- doUncompress(stream, ustream);
3274
- stream.b.swap(ustream.b);
3275
- #else
3276
- throw FeatureNotSupportedException(__FILE__, __LINE__, "Cannot uncompress compressed message");
3277
- #endif
3278
- }
3279
- stream.i = stream.b.begin() + headerSize;
3280
-
3281
- switch(messageType)
3282
- {
3283
- case closeConnectionMsg:
3284
- {
3285
- traceRecv(stream, _logger, _traceLevels);
3286
- if(_endpoint->datagram())
3287
- {
3288
- if(_warn)
3289
- {
3290
- Warning out(_logger);
3291
- out << "ignoring close connection message for datagram connection:\n" << _desc;
3292
- }
3293
- }
3294
- else
3295
- {
3296
- setState(StateClosingPending, CloseConnectionException(__FILE__, __LINE__));
3297
-
3298
- //
3299
- // Notify the transceiver of the graceful connection closure.
3300
- //
3301
- SocketOperation op = _transceiver->closing(false, *_exception);
3302
- if(op)
3303
- {
3304
- return op;
3305
- }
3306
- setState(StateClosed);
3307
- }
3308
- break;
3309
- }
3310
-
3311
- case requestMsg:
3312
- {
3313
- if(_state >= StateClosing)
3314
- {
3315
- trace("received request during closing\n(ignored by server, client will retry)", stream, _logger,
3316
- _traceLevels);
3317
- }
3318
- else
3319
- {
3320
- traceRecv(stream, _logger, _traceLevels);
3321
- stream.read(requestId);
3322
- invokeNum = 1;
3323
- servantManager = _servantManager;
3324
- adapter = _adapter;
3325
- ++dispatchCount;
3326
- }
3327
- break;
3328
- }
3329
-
3330
- case requestBatchMsg:
3331
- {
3332
- if(_state >= StateClosing)
3333
- {
3334
- trace("received batch request during closing\n(ignored by server, client will retry)", stream,
3335
- _logger, _traceLevels);
3336
- }
3337
- else
3338
- {
3339
- traceRecv(stream, _logger, _traceLevels);
3340
- stream.read(invokeNum);
3341
- if(invokeNum < 0)
3342
- {
3343
- invokeNum = 0;
3344
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
3345
- }
3346
- servantManager = _servantManager;
3347
- adapter = _adapter;
3348
- dispatchCount += invokeNum;
3349
- }
3350
- break;
3351
- }
3352
-
3353
- case replyMsg:
3354
- {
3355
- traceRecv(stream, _logger, _traceLevels);
3356
-
3357
- stream.read(requestId);
3358
-
3359
- map<Int, OutgoingAsyncBasePtr>::iterator q = _asyncRequests.end();
3360
-
3361
- if(_asyncRequestsHint != _asyncRequests.end())
3362
- {
3363
- if(_asyncRequestsHint->first == requestId)
3364
- {
3365
- q = _asyncRequestsHint;
3366
- }
3367
- }
3368
-
3369
- if(q == _asyncRequests.end())
3370
- {
3371
- q = _asyncRequests.find(requestId);
3372
- }
3373
-
3374
- if(q != _asyncRequests.end())
3375
- {
3376
- outAsync = q->second;
3377
-
3378
- if(q == _asyncRequestsHint)
3379
- {
3380
- _asyncRequests.erase(q++);
3381
- _asyncRequestsHint = q;
3382
- }
3383
- else
3384
- {
3385
- _asyncRequests.erase(q);
3386
- }
3387
-
3388
- stream.swap(*outAsync->getIs());
3389
-
3390
- #if defined(ICE_USE_IOCP)
3391
- //
3392
- // If we just received the reply of a request which isn't acknowledge as
3393
- // sent yet, we queue the reply instead of processing it right away. It
3394
- // will be processed once the write callback is invoked for the message.
3395
- //
3396
- OutgoingMessage* message = _sendStreams.empty() ? 0 : &_sendStreams.front();
3397
- if(message && message->outAsync.get() == outAsync.get())
3398
- {
3399
- message->receivedReply = true;
3400
- outAsync = 0;
3401
- }
3402
- else if(outAsync->response())
3403
- {
3404
- ++dispatchCount;
3405
- }
3406
- else
3407
- {
3408
- outAsync = 0;
3409
- }
3410
- #else
3411
- if(outAsync->response())
3412
- {
3413
- ++dispatchCount;
3414
- }
3415
- else
3416
- {
3417
- outAsync = 0;
3418
- }
3419
- #endif
3420
- notifyAll(); // Notify threads blocked in close(false)
3421
- }
3422
-
3423
- break;
3424
- }
3425
-
3426
- case validateConnectionMsg:
3427
- {
3428
- traceRecv(stream, _logger, _traceLevels);
3429
- if(_heartbeatCallback)
3430
- {
3431
- heartbeatCallback = _heartbeatCallback;
3432
- ++dispatchCount;
3433
- }
3434
- break;
3435
- }
3436
-
3437
- default:
3438
- {
3439
- trace("received unknown message\n(invalid, closing connection)", stream, _logger, _traceLevels);
3440
- throw UnknownMessageException(__FILE__, __LINE__);
3441
- }
3442
- }
3443
- }
3444
- catch(const LocalException& ex)
3445
- {
3446
- if(_endpoint->datagram())
3447
- {
3448
- if(_warn)
3449
- {
3450
- Warning out(_logger);
3451
- out << "datagram connection exception:\n" << ex << '\n' << _desc;
3452
- }
3453
- }
3454
- else
3455
- {
3456
- setState(StateClosed, ex);
3457
- }
3458
- }
3459
-
3460
- return _state == StateHolding ? SocketOperationNone : SocketOperationRead;
3461
- }
3462
-
3463
- void
3464
- Ice::ConnectionI::invokeAll(InputStream& stream, Int invokeNum, Int requestId, Byte compress,
3465
- const ServantManagerPtr& servantManager, const ObjectAdapterPtr& adapter)
3466
- {
3467
- //
3468
- // Note: In contrast to other private or protected methods, this
3469
- // operation must be called *without* the mutex locked.
3470
- //
3471
-
3472
- try
3473
- {
3474
- while(invokeNum > 0)
3475
- {
3476
- //
3477
- // Prepare the invocation.
3478
- //
3479
- bool response = !_endpoint->datagram() && requestId != 0;
3480
- assert(!response || invokeNum == 1);
3481
-
3482
- Incoming in(_instance.get(), this, this, adapter, response, compress, requestId);
3483
-
3484
- //
3485
- // Dispatch the invocation.
3486
- //
3487
- in.invoke(servantManager, &stream);
3488
-
3489
- --invokeNum;
3490
- }
3491
-
3492
- stream.clear();
3493
- }
3494
- catch(const LocalException& ex)
3495
- {
3496
- invokeException(requestId, ex, invokeNum, false); // Fatal invocation exception
3497
- }
3498
- }
3499
-
3500
- void
3501
- Ice::ConnectionI::scheduleTimeout(SocketOperation status)
3502
- {
3503
- int timeout;
3504
- if(_state < StateActive)
3505
- {
3506
- DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
3507
- if(defaultsAndOverrides->overrideConnectTimeout)
3508
- {
3509
- timeout = defaultsAndOverrides->overrideConnectTimeoutValue;
3510
- }
3511
- else
3512
- {
3513
- timeout = _endpoint->timeout();
3514
- }
3515
- }
3516
- else if(_state < StateClosingPending)
3517
- {
3518
- if(_readHeader) // No timeout for reading the header.
3519
- {
3520
- status = static_cast<SocketOperation>(status & ~SocketOperationRead);
3521
- }
3522
- timeout = _endpoint->timeout();
3523
- }
3524
- else
3525
- {
3526
- DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
3527
- if(defaultsAndOverrides->overrideCloseTimeout)
3528
- {
3529
- timeout = defaultsAndOverrides->overrideCloseTimeoutValue;
3530
- }
3531
- else
3532
- {
3533
- timeout = _endpoint->timeout();
3534
- }
3535
- }
3536
-
3537
- if(timeout < 0)
3538
- {
3539
- return;
3540
- }
3541
-
3542
- try
3543
- {
3544
- if(status & IceInternal::SocketOperationRead)
3545
- {
3546
- if(_readTimeoutScheduled)
3547
- {
3548
- _timer->cancel(_readTimeout);
3549
- }
3550
- _timer->schedule(_readTimeout, IceUtil::Time::milliSeconds(timeout));
3551
- _readTimeoutScheduled = true;
3552
- }
3553
- if(status & (IceInternal::SocketOperationWrite | IceInternal::SocketOperationConnect))
3554
- {
3555
- if(_writeTimeoutScheduled)
3556
- {
3557
- _timer->cancel(_writeTimeout);
3558
- }
3559
- _timer->schedule(_writeTimeout, IceUtil::Time::milliSeconds(timeout));
3560
- _writeTimeoutScheduled = true;
3561
- }
3562
- }
3563
- catch(const IceUtil::Exception&)
3564
- {
3565
- assert(false);
3566
- }
3567
- }
3568
-
3569
- void
3570
- Ice::ConnectionI::unscheduleTimeout(SocketOperation status)
3571
- {
3572
- if((status & IceInternal::SocketOperationRead) && _readTimeoutScheduled)
3573
- {
3574
- _timer->cancel(_readTimeout);
3575
- _readTimeoutScheduled = false;
3576
- }
3577
- if((status & (IceInternal::SocketOperationWrite | IceInternal::SocketOperationConnect)) &&
3578
- _writeTimeoutScheduled)
3579
- {
3580
- _timer->cancel(_writeTimeout);
3581
- _writeTimeoutScheduled = false;
3582
- }
3583
- }
3584
-
3585
- Ice::ConnectionInfoPtr
3586
- Ice::ConnectionI::initConnectionInfo() const
3587
- {
3588
- if(_state > StateNotInitialized && _info) // Update the connection information until it's initialized
3589
- {
3590
- return _info;
3591
- }
3592
-
3593
- try
3594
- {
3595
- _info = _transceiver->getInfo();
3596
- }
3597
- catch(const Ice::LocalException&)
3598
- {
3599
- _info = ICE_MAKE_SHARED(ConnectionInfo);
3600
- }
3601
-
3602
- Ice::ConnectionInfoPtr info = _info;
3603
- while(info)
3604
- {
3605
- info->connectionId = _endpoint->connectionId();
3606
- info->incoming = _connector == 0;
3607
- info->adapterName = _adapter ? _adapter->getName() : string();
3608
- info = info->underlying;
3609
- }
3610
- return _info;
3611
- }
3612
-
3613
- ConnectionState
3614
- ConnectionI::toConnectionState(State state) const
3615
- {
3616
- return connectionStateMap[static_cast<int>(state)];
3617
- }
3618
-
3619
- SocketOperation
3620
- ConnectionI::read(Buffer& buf)
3621
- {
3622
- Buffer::Container::iterator start = buf.i;
3623
- SocketOperation op = _transceiver->read(buf);
3624
- if(_instance->traceLevels()->network >= 3 && buf.i != start)
3625
- {
3626
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
3627
- out << "received ";
3628
- if(_endpoint->datagram())
3629
- {
3630
- out << buf.b.size();
3631
- }
3632
- else
3633
- {
3634
- out << (buf.i - start) << " of " << (buf.b.end() - start);
3635
- }
3636
- out << " bytes via " << _endpoint->protocol() << "\n" << toString();
3637
- }
3638
- return op;
3639
- }
3640
-
3641
- SocketOperation
3642
- ConnectionI::write(Buffer& buf)
3643
- {
3644
- Buffer::Container::iterator start = buf.i;
3645
- SocketOperation op = _transceiver->write(buf);
3646
- if(_instance->traceLevels()->network >= 3 && buf.i != start)
3647
- {
3648
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
3649
- out << "sent " << (buf.i - start);
3650
- if(!_endpoint->datagram())
3651
- {
3652
- out << " of " << (buf.b.end() - start);
3653
- }
3654
- out << " bytes via " << _endpoint->protocol() << "\n" << toString();
3655
- }
3656
- return op;
3657
- }
3658
-
3659
- void
3660
- ConnectionI::reap()
3661
- {
3662
- if(_monitor)
3663
- {
3664
- _monitor->reap(ICE_SHARED_FROM_THIS);
3665
- }
3666
- if(_observer)
3667
- {
3668
- _observer.detach();
3669
- }
3670
- }