zeroc-ice 3.7.9.1 → 3.7.11

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