zeroc-ice 3.7.10 → 3.7.12

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