zeroc-ice 3.6b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (675) hide show
  1. checksums.yaml +7 -0
  2. data/ICE_LICENSE +54 -0
  3. data/LICENSE +339 -0
  4. data/bin/slice2rb +17 -0
  5. data/ext/Communicator.cpp +596 -0
  6. data/ext/Communicator.h +25 -0
  7. data/ext/Config.h +111 -0
  8. data/ext/Connection.cpp +381 -0
  9. data/ext/Connection.h +26 -0
  10. data/ext/Endpoint.cpp +311 -0
  11. data/ext/Endpoint.h +27 -0
  12. data/ext/ImplicitContext.cpp +152 -0
  13. data/ext/ImplicitContext.h +25 -0
  14. data/ext/Init.cpp +52 -0
  15. data/ext/Logger.cpp +151 -0
  16. data/ext/Logger.h +28 -0
  17. data/ext/ObjectFactory.cpp +140 -0
  18. data/ext/ObjectFactory.h +50 -0
  19. data/ext/Operation.cpp +676 -0
  20. data/ext/Operation.h +36 -0
  21. data/ext/Properties.cpp +369 -0
  22. data/ext/Properties.h +25 -0
  23. data/ext/Proxy.cpp +1354 -0
  24. data/ext/Proxy.h +27 -0
  25. data/ext/Slice.cpp +223 -0
  26. data/ext/Slice.h +22 -0
  27. data/ext/Types.cpp +3160 -0
  28. data/ext/Types.h +545 -0
  29. data/ext/Util.cpp +792 -0
  30. data/ext/Util.h +511 -0
  31. data/ext/extconf.rb +118 -0
  32. data/ext/ice/BZIP_LICENSE +42 -0
  33. data/ext/ice/MCPP_LICENSE +36 -0
  34. data/ext/ice/bzip2/blocksort.c +1094 -0
  35. data/ext/ice/bzip2/bzlib.c +1572 -0
  36. data/ext/ice/bzip2/bzlib.h +282 -0
  37. data/ext/ice/bzip2/bzlib_private.h +509 -0
  38. data/ext/ice/bzip2/compress.c +672 -0
  39. data/ext/ice/bzip2/crctable.c +104 -0
  40. data/ext/ice/bzip2/decompress.c +646 -0
  41. data/ext/ice/bzip2/huffman.c +205 -0
  42. data/ext/ice/bzip2/randtable.c +84 -0
  43. data/ext/ice/cpp/include/Ice/ACMF.h +30 -0
  44. data/ext/ice/cpp/include/Ice/Application.h +156 -0
  45. data/ext/ice/cpp/include/Ice/AsyncResult.h +363 -0
  46. data/ext/ice/cpp/include/Ice/AsyncResultF.h +26 -0
  47. data/ext/ice/cpp/include/Ice/BasicStream.h +1315 -0
  48. data/ext/ice/cpp/include/Ice/Buffer.h +159 -0
  49. data/ext/ice/cpp/include/Ice/BuiltinSequences.h +74 -0
  50. data/ext/ice/cpp/include/Ice/Communicator.h +194 -0
  51. data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +115 -0
  52. data/ext/ice/cpp/include/Ice/CommunicatorF.h +60 -0
  53. data/ext/ice/cpp/include/Ice/Config.h +97 -0
  54. data/ext/ice/cpp/include/Ice/Connection.h +495 -0
  55. data/ext/ice/cpp/include/Ice/ConnectionAsync.h +115 -0
  56. data/ext/ice/cpp/include/Ice/ConnectionF.h +72 -0
  57. data/ext/ice/cpp/include/Ice/ConnectionFactoryF.h +30 -0
  58. data/ext/ice/cpp/include/Ice/ConnectionIF.h +37 -0
  59. data/ext/ice/cpp/include/Ice/Current.h +94 -0
  60. data/ext/ice/cpp/include/Ice/DefaultObjectFactory.h +48 -0
  61. data/ext/ice/cpp/include/Ice/DeprecatedStringConverter.h +62 -0
  62. data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +33 -0
  63. data/ext/ice/cpp/include/Ice/Dispatcher.h +51 -0
  64. data/ext/ice/cpp/include/Ice/DynamicLibrary.h +105 -0
  65. data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +29 -0
  66. data/ext/ice/cpp/include/Ice/Endpoint.h +350 -0
  67. data/ext/ice/cpp/include/Ice/EndpointF.h +97 -0
  68. data/ext/ice/cpp/include/Ice/EndpointTypes.h +74 -0
  69. data/ext/ice/cpp/include/Ice/Exception.h +114 -0
  70. data/ext/ice/cpp/include/Ice/FacetMap.h +56 -0
  71. data/ext/ice/cpp/include/Ice/FactoryTable.h +69 -0
  72. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +87 -0
  73. data/ext/ice/cpp/include/Ice/Format.h +39 -0
  74. data/ext/ice/cpp/include/Ice/Functional.h +138 -0
  75. data/ext/ice/cpp/include/Ice/GCObject.h +73 -0
  76. data/ext/ice/cpp/include/Ice/Handle.h +192 -0
  77. data/ext/ice/cpp/include/Ice/Ice.h +54 -0
  78. data/ext/ice/cpp/include/Ice/Identity.h +160 -0
  79. data/ext/ice/cpp/include/Ice/ImplicitContext.h +96 -0
  80. data/ext/ice/cpp/include/Ice/ImplicitContextF.h +60 -0
  81. data/ext/ice/cpp/include/Ice/Incoming.h +131 -0
  82. data/ext/ice/cpp/include/Ice/IncomingAsync.h +108 -0
  83. data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +35 -0
  84. data/ext/ice/cpp/include/Ice/Initialize.h +141 -0
  85. data/ext/ice/cpp/include/Ice/InstanceF.h +26 -0
  86. data/ext/ice/cpp/include/Ice/Instrumentation.h +377 -0
  87. data/ext/ice/cpp/include/Ice/InstrumentationF.h +71 -0
  88. data/ext/ice/cpp/include/Ice/LocalException.h +1022 -0
  89. data/ext/ice/cpp/include/Ice/LocalObject.h +36 -0
  90. data/ext/ice/cpp/include/Ice/LocalObjectF.h +26 -0
  91. data/ext/ice/cpp/include/Ice/Locator.h +2191 -0
  92. data/ext/ice/cpp/include/Ice/LocatorF.h +89 -0
  93. data/ext/ice/cpp/include/Ice/Logger.h +94 -0
  94. data/ext/ice/cpp/include/Ice/LoggerF.h +60 -0
  95. data/ext/ice/cpp/include/Ice/LoggerUtil.h +153 -0
  96. data/ext/ice/cpp/include/Ice/Makefile +26 -0
  97. data/ext/ice/cpp/include/Ice/Metrics.h +2989 -0
  98. data/ext/ice/cpp/include/Ice/MetricsAdminI.h +662 -0
  99. data/ext/ice/cpp/include/Ice/MetricsFunctional.h +144 -0
  100. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +576 -0
  101. data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +55 -0
  102. data/ext/ice/cpp/include/Ice/Object.h +165 -0
  103. data/ext/ice/cpp/include/Ice/ObjectAdapter.h +162 -0
  104. data/ext/ice/cpp/include/Ice/ObjectAdapterF.h +60 -0
  105. data/ext/ice/cpp/include/Ice/ObjectAdapterFactoryF.h +26 -0
  106. data/ext/ice/cpp/include/Ice/ObjectF.h +26 -0
  107. data/ext/ice/cpp/include/Ice/ObjectFactory.h +86 -0
  108. data/ext/ice/cpp/include/Ice/ObjectFactoryF.h +60 -0
  109. data/ext/ice/cpp/include/Ice/ObjectFactoryManagerF.h +26 -0
  110. data/ext/ice/cpp/include/Ice/ObserverHelper.h +177 -0
  111. data/ext/ice/cpp/include/Ice/Outgoing.h +197 -0
  112. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +264 -0
  113. data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +38 -0
  114. data/ext/ice/cpp/include/Ice/Plugin.h +121 -0
  115. data/ext/ice/cpp/include/Ice/PluginF.h +66 -0
  116. data/ext/ice/cpp/include/Ice/Process.h +568 -0
  117. data/ext/ice/cpp/include/Ice/ProcessF.h +77 -0
  118. data/ext/ice/cpp/include/Ice/Properties.h +130 -0
  119. data/ext/ice/cpp/include/Ice/PropertiesAdmin.h +824 -0
  120. data/ext/ice/cpp/include/Ice/PropertiesF.h +83 -0
  121. data/ext/ice/cpp/include/Ice/Protocol.h +242 -0
  122. data/ext/ice/cpp/include/Ice/Proxy.h +2448 -0
  123. data/ext/ice/cpp/include/Ice/ProxyF.h +78 -0
  124. data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +26 -0
  125. data/ext/ice/cpp/include/Ice/ProxyHandle.h +330 -0
  126. data/ext/ice/cpp/include/Ice/ReferenceF.h +34 -0
  127. data/ext/ice/cpp/include/Ice/RemoteLogger.h +1496 -0
  128. data/ext/ice/cpp/include/Ice/RequestHandlerF.h +29 -0
  129. data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +25 -0
  130. data/ext/ice/cpp/include/Ice/Router.h +1155 -0
  131. data/ext/ice/cpp/include/Ice/RouterF.h +77 -0
  132. data/ext/ice/cpp/include/Ice/ServantLocator.h +90 -0
  133. data/ext/ice/cpp/include/Ice/ServantLocatorF.h +60 -0
  134. data/ext/ice/cpp/include/Ice/ServantManagerF.h +26 -0
  135. data/ext/ice/cpp/include/Ice/Service.h +260 -0
  136. data/ext/ice/cpp/include/Ice/SliceChecksumDict.h +56 -0
  137. data/ext/ice/cpp/include/Ice/SliceChecksums.h +34 -0
  138. data/ext/ice/cpp/include/Ice/SlicedData.h +103 -0
  139. data/ext/ice/cpp/include/Ice/SlicedDataF.h +34 -0
  140. data/ext/ice/cpp/include/Ice/Stream.h +449 -0
  141. data/ext/ice/cpp/include/Ice/StreamF.h +30 -0
  142. data/ext/ice/cpp/include/Ice/StreamHelpers.h +877 -0
  143. data/ext/ice/cpp/include/Ice/ThreadPoolF.h +28 -0
  144. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +56 -0
  145. data/ext/ice/cpp/include/Ice/Version.h +254 -0
  146. data/ext/ice/cpp/include/IceSSL/Config.h +23 -0
  147. data/ext/ice/cpp/include/IceSSL/ConnectionInfo.h +119 -0
  148. data/ext/ice/cpp/include/IceSSL/EndpointInfo.h +101 -0
  149. data/ext/ice/cpp/include/IceSSL/IceSSL.h +22 -0
  150. data/ext/ice/cpp/include/IceSSL/Makefile +26 -0
  151. data/ext/ice/cpp/include/IceSSL/Plugin.h +558 -0
  152. data/ext/ice/cpp/include/IceUtil/AbstractMutex.h +119 -0
  153. data/ext/ice/cpp/include/IceUtil/Cache.h +362 -0
  154. data/ext/ice/cpp/include/IceUtil/Cond.h +323 -0
  155. data/ext/ice/cpp/include/IceUtil/Config.h +234 -0
  156. data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +50 -0
  157. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +70 -0
  158. data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +45 -0
  159. data/ext/ice/cpp/include/IceUtil/Exception.h +184 -0
  160. data/ext/ice/cpp/include/IceUtil/Functional.h +389 -0
  161. data/ext/ice/cpp/include/IceUtil/Handle.h +266 -0
  162. data/ext/ice/cpp/include/IceUtil/IceUtil.h +51 -0
  163. data/ext/ice/cpp/include/IceUtil/IconvStringConverter.h +302 -0
  164. data/ext/ice/cpp/include/IceUtil/InputUtil.h +47 -0
  165. data/ext/ice/cpp/include/IceUtil/Iterator.h +36 -0
  166. data/ext/ice/cpp/include/IceUtil/Lock.h +135 -0
  167. data/ext/ice/cpp/include/IceUtil/Makefile +26 -0
  168. data/ext/ice/cpp/include/IceUtil/Monitor.h +249 -0
  169. data/ext/ice/cpp/include/IceUtil/Mutex.h +357 -0
  170. data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +28 -0
  171. data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +83 -0
  172. data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +82 -0
  173. data/ext/ice/cpp/include/IceUtil/Optional.h +322 -0
  174. data/ext/ice/cpp/include/IceUtil/Options.h +141 -0
  175. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +362 -0
  176. data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +19 -0
  177. data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +26 -0
  178. data/ext/ice/cpp/include/IceUtil/Random.h +24 -0
  179. data/ext/ice/cpp/include/IceUtil/RecMutex.h +113 -0
  180. data/ext/ice/cpp/include/IceUtil/SHA1.h +65 -0
  181. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +44 -0
  182. data/ext/ice/cpp/include/IceUtil/ScopedArray.h +97 -0
  183. data/ext/ice/cpp/include/IceUtil/Shared.h +168 -0
  184. data/ext/ice/cpp/include/IceUtil/StringConverter.h +175 -0
  185. data/ext/ice/cpp/include/IceUtil/StringUtil.h +91 -0
  186. data/ext/ice/cpp/include/IceUtil/Thread.h +181 -0
  187. data/ext/ice/cpp/include/IceUtil/ThreadException.h +108 -0
  188. data/ext/ice/cpp/include/IceUtil/Time.h +209 -0
  189. data/ext/ice/cpp/include/IceUtil/Timer.h +143 -0
  190. data/ext/ice/cpp/include/IceUtil/UUID.h +22 -0
  191. data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +42 -0
  192. data/ext/ice/cpp/include/IceUtil/UniquePtr.h +101 -0
  193. data/ext/ice/cpp/include/Slice/CPlusPlusUtil.h +64 -0
  194. data/ext/ice/cpp/include/Slice/Checksum.h +26 -0
  195. data/ext/ice/cpp/include/Slice/CsUtil.h +92 -0
  196. data/ext/ice/cpp/include/Slice/DotNetNames.h +34 -0
  197. data/ext/ice/cpp/include/Slice/FileTracker.h +71 -0
  198. data/ext/ice/cpp/include/Slice/JavaUtil.h +277 -0
  199. data/ext/ice/cpp/include/Slice/Makefile +26 -0
  200. data/ext/ice/cpp/include/Slice/PHPUtil.h +50 -0
  201. data/ext/ice/cpp/include/Slice/Parser.h +1116 -0
  202. data/ext/ice/cpp/include/Slice/Preprocessor.h +68 -0
  203. data/ext/ice/cpp/include/Slice/PythonUtil.h +64 -0
  204. data/ext/ice/cpp/include/Slice/RubyUtil.h +54 -0
  205. data/ext/ice/cpp/include/Slice/Util.h +33 -0
  206. data/ext/ice/cpp/src/Ice/ACM.cpp +343 -0
  207. data/ext/ice/cpp/src/Ice/ACM.h +117 -0
  208. data/ext/ice/cpp/src/Ice/Acceptor.cpp +16 -0
  209. data/ext/ice/cpp/src/Ice/Acceptor.h +41 -0
  210. data/ext/ice/cpp/src/Ice/AcceptorF.h +30 -0
  211. data/ext/ice/cpp/src/Ice/Application.cpp +760 -0
  212. data/ext/ice/cpp/src/Ice/AsyncResult.cpp +599 -0
  213. data/ext/ice/cpp/src/Ice/Base64.cpp +269 -0
  214. data/ext/ice/cpp/src/Ice/Base64.h +36 -0
  215. data/ext/ice/cpp/src/Ice/BasicStream.cpp +3393 -0
  216. data/ext/ice/cpp/src/Ice/Buffer.cpp +98 -0
  217. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +34 -0
  218. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +718 -0
  219. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +106 -0
  220. data/ext/ice/cpp/src/Ice/Communicator.cpp +45 -0
  221. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +38 -0
  222. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +386 -0
  223. data/ext/ice/cpp/src/Ice/CommunicatorI.h +112 -0
  224. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +546 -0
  225. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +97 -0
  226. data/ext/ice/cpp/src/Ice/Connection.cpp +58 -0
  227. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +38 -0
  228. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +1639 -0
  229. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +236 -0
  230. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +3876 -0
  231. data/ext/ice/cpp/src/Ice/ConnectionI.h +364 -0
  232. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +115 -0
  233. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +50 -0
  234. data/ext/ice/cpp/src/Ice/Connector.cpp +16 -0
  235. data/ext/ice/cpp/src/Ice/Connector.h +36 -0
  236. data/ext/ice/cpp/src/Ice/ConnectorF.h +26 -0
  237. data/ext/ice/cpp/src/Ice/Current.cpp +38 -0
  238. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +168 -0
  239. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +57 -0
  240. data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +26 -0
  241. data/ext/ice/cpp/src/Ice/DeprecatedStringConverter.cpp +60 -0
  242. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +49 -0
  243. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +281 -0
  244. data/ext/ice/cpp/src/Ice/Endpoint.cpp +53 -0
  245. data/ext/ice/cpp/src/Ice/EndpointF.cpp +38 -0
  246. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +25 -0
  247. data/ext/ice/cpp/src/Ice/EndpointFactory.h +44 -0
  248. data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +26 -0
  249. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +208 -0
  250. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +46 -0
  251. data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +26 -0
  252. data/ext/ice/cpp/src/Ice/EndpointI.cpp +87 -0
  253. data/ext/ice/cpp/src/Ice/EndpointI.h +165 -0
  254. data/ext/ice/cpp/src/Ice/EndpointIF.h +41 -0
  255. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +38 -0
  256. data/ext/ice/cpp/src/Ice/EventHandler.cpp +35 -0
  257. data/ext/ice/cpp/src/Ice/EventHandler.h +78 -0
  258. data/ext/ice/cpp/src/Ice/EventHandlerF.h +26 -0
  259. data/ext/ice/cpp/src/Ice/EventLoggerMsg.h +53 -0
  260. data/ext/ice/cpp/src/Ice/Exception.cpp +832 -0
  261. data/ext/ice/cpp/src/Ice/FacetMap.cpp +34 -0
  262. data/ext/ice/cpp/src/Ice/FactoryTable.cpp +158 -0
  263. data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +95 -0
  264. data/ext/ice/cpp/src/Ice/GCObject.cpp +444 -0
  265. data/ext/ice/cpp/src/Ice/HashUtil.h +59 -0
  266. data/ext/ice/cpp/src/Ice/HttpParser.cpp +680 -0
  267. data/ext/ice/cpp/src/Ice/HttpParser.h +124 -0
  268. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +733 -0
  269. data/ext/ice/cpp/src/Ice/IPEndpointI.h +157 -0
  270. data/ext/ice/cpp/src/Ice/IPEndpointIF.h +29 -0
  271. data/ext/ice/cpp/src/Ice/Identity.cpp +42 -0
  272. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +41 -0
  273. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +38 -0
  274. data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +639 -0
  275. data/ext/ice/cpp/src/Ice/ImplicitContextI.h +51 -0
  276. data/ext/ice/cpp/src/Ice/Incoming.cpp +757 -0
  277. data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +340 -0
  278. data/ext/ice/cpp/src/Ice/IncomingRequest.h +37 -0
  279. data/ext/ice/cpp/src/Ice/Initialize.cpp +401 -0
  280. data/ext/ice/cpp/src/Ice/Instance.cpp +1928 -0
  281. data/ext/ice/cpp/src/Ice/Instance.h +198 -0
  282. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +68 -0
  283. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +43 -0
  284. data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +1083 -0
  285. data/ext/ice/cpp/src/Ice/InstrumentationI.h +262 -0
  286. data/ext/ice/cpp/src/Ice/LocalException.cpp +2091 -0
  287. data/ext/ice/cpp/src/Ice/LocalObject.cpp +29 -0
  288. data/ext/ice/cpp/src/Ice/Locator.cpp +1946 -0
  289. data/ext/ice/cpp/src/Ice/LocatorF.cpp +39 -0
  290. data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +917 -0
  291. data/ext/ice/cpp/src/Ice/LocatorInfo.h +193 -0
  292. data/ext/ice/cpp/src/Ice/LocatorInfoF.h +34 -0
  293. data/ext/ice/cpp/src/Ice/Logger.cpp +40 -0
  294. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +862 -0
  295. data/ext/ice/cpp/src/Ice/LoggerAdminI.h +46 -0
  296. data/ext/ice/cpp/src/Ice/LoggerF.cpp +38 -0
  297. data/ext/ice/cpp/src/Ice/LoggerI.cpp +199 -0
  298. data/ext/ice/cpp/src/Ice/LoggerI.h +57 -0
  299. data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +107 -0
  300. data/ext/ice/cpp/src/Ice/Makefile +190 -0
  301. data/ext/ice/cpp/src/Ice/Metrics.cpp +2159 -0
  302. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +669 -0
  303. data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +14 -0
  304. data/ext/ice/cpp/src/Ice/Network.cpp +2694 -0
  305. data/ext/ice/cpp/src/Ice/Network.h +291 -0
  306. data/ext/ice/cpp/src/Ice/NetworkF.h +28 -0
  307. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +325 -0
  308. data/ext/ice/cpp/src/Ice/NetworkProxy.h +74 -0
  309. data/ext/ice/cpp/src/Ice/NetworkProxyF.h +26 -0
  310. data/ext/ice/cpp/src/Ice/Object.cpp +440 -0
  311. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +41 -0
  312. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +38 -0
  313. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +241 -0
  314. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +52 -0
  315. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +1498 -0
  316. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +155 -0
  317. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +41 -0
  318. data/ext/ice/cpp/src/Ice/ObjectFactoryF.cpp +38 -0
  319. data/ext/ice/cpp/src/Ice/ObjectFactoryManager.cpp +140 -0
  320. data/ext/ice/cpp/src/Ice/ObjectFactoryManager.h +43 -0
  321. data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +84 -0
  322. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +407 -0
  323. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +70 -0
  324. data/ext/ice/cpp/src/Ice/Outgoing.cpp +737 -0
  325. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +874 -0
  326. data/ext/ice/cpp/src/Ice/Plugin.cpp +43 -0
  327. data/ext/ice/cpp/src/Ice/PluginF.cpp +38 -0
  328. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +503 -0
  329. data/ext/ice/cpp/src/Ice/PluginManagerI.h +67 -0
  330. data/ext/ice/cpp/src/Ice/Process.cpp +299 -0
  331. data/ext/ice/cpp/src/Ice/ProcessF.cpp +39 -0
  332. data/ext/ice/cpp/src/Ice/Properties.cpp +45 -0
  333. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +555 -0
  334. data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +207 -0
  335. data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +45 -0
  336. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +39 -0
  337. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +759 -0
  338. data/ext/ice/cpp/src/Ice/PropertiesI.h +78 -0
  339. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +1293 -0
  340. data/ext/ice/cpp/src/Ice/PropertyNames.h +81 -0
  341. data/ext/ice/cpp/src/Ice/Protocol.cpp +137 -0
  342. data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +98 -0
  343. data/ext/ice/cpp/src/Ice/ProtocolInstance.h +91 -0
  344. data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +26 -0
  345. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +51 -0
  346. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +67 -0
  347. data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +26 -0
  348. data/ext/ice/cpp/src/Ice/Proxy.cpp +1810 -0
  349. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +305 -0
  350. data/ext/ice/cpp/src/Ice/ProxyFactory.h +57 -0
  351. data/ext/ice/cpp/src/Ice/Reference.cpp +1947 -0
  352. data/ext/ice/cpp/src/Ice/Reference.h +305 -0
  353. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +937 -0
  354. data/ext/ice/cpp/src/Ice/ReferenceFactory.h +81 -0
  355. data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +24 -0
  356. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +958 -0
  357. data/ext/ice/cpp/src/Ice/ReplyStatus.h +29 -0
  358. data/ext/ice/cpp/src/Ice/RequestHandler.cpp +40 -0
  359. data/ext/ice/cpp/src/Ice/RequestHandler.h +90 -0
  360. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +70 -0
  361. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +41 -0
  362. data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +20 -0
  363. data/ext/ice/cpp/src/Ice/ResponseHandler.h +39 -0
  364. data/ext/ice/cpp/src/Ice/RetryQueue.cpp +154 -0
  365. data/ext/ice/cpp/src/Ice/RetryQueue.h +69 -0
  366. data/ext/ice/cpp/src/Ice/RetryQueueF.h +24 -0
  367. data/ext/ice/cpp/src/Ice/Router.cpp +849 -0
  368. data/ext/ice/cpp/src/Ice/RouterF.cpp +39 -0
  369. data/ext/ice/cpp/src/Ice/RouterInfo.cpp +381 -0
  370. data/ext/ice/cpp/src/Ice/RouterInfo.h +148 -0
  371. data/ext/ice/cpp/src/Ice/RouterInfoF.h +30 -0
  372. data/ext/ice/cpp/src/Ice/Selector.cpp +926 -0
  373. data/ext/ice/cpp/src/Ice/Selector.h +231 -0
  374. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +41 -0
  375. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +38 -0
  376. data/ext/ice/cpp/src/Ice/ServantManager.cpp +495 -0
  377. data/ext/ice/cpp/src/Ice/ServantManager.h +74 -0
  378. data/ext/ice/cpp/src/Ice/Service.cpp +1897 -0
  379. data/ext/ice/cpp/src/Ice/SharedContext.h +51 -0
  380. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +34 -0
  381. data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +80 -0
  382. data/ext/ice/cpp/src/Ice/SlicedData.cpp +80 -0
  383. data/ext/ice/cpp/src/Ice/Stream.cpp +53 -0
  384. data/ext/ice/cpp/src/Ice/StreamI.cpp +832 -0
  385. data/ext/ice/cpp/src/Ice/StreamI.h +198 -0
  386. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +521 -0
  387. data/ext/ice/cpp/src/Ice/StreamSocket.h +85 -0
  388. data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +145 -0
  389. data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +167 -0
  390. data/ext/ice/cpp/src/Ice/SysLoggerI.h +43 -0
  391. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +235 -0
  392. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +67 -0
  393. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +133 -0
  394. data/ext/ice/cpp/src/Ice/TcpConnector.h +51 -0
  395. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +397 -0
  396. data/ext/ice/cpp/src/Ice/TcpEndpointI.h +93 -0
  397. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +127 -0
  398. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +61 -0
  399. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +1357 -0
  400. data/ext/ice/cpp/src/Ice/ThreadPool.h +399 -0
  401. data/ext/ice/cpp/src/Ice/TraceLevels.cpp +43 -0
  402. data/ext/ice/cpp/src/Ice/TraceLevels.h +50 -0
  403. data/ext/ice/cpp/src/Ice/TraceLevelsF.h +26 -0
  404. data/ext/ice/cpp/src/Ice/TraceUtil.cpp +452 -0
  405. data/ext/ice/cpp/src/Ice/TraceUtil.h +28 -0
  406. data/ext/ice/cpp/src/Ice/Transceiver.cpp +24 -0
  407. data/ext/ice/cpp/src/Ice/Transceiver.h +52 -0
  408. data/ext/ice/cpp/src/Ice/TransceiverF.h +38 -0
  409. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +144 -0
  410. data/ext/ice/cpp/src/Ice/UdpConnector.h +51 -0
  411. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +483 -0
  412. data/ext/ice/cpp/src/Ice/UdpEndpointI.h +95 -0
  413. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +1156 -0
  414. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +123 -0
  415. data/ext/ice/cpp/src/Ice/Version.cpp +46 -0
  416. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +103 -0
  417. data/ext/ice/cpp/src/Ice/WSAcceptor.h +61 -0
  418. data/ext/ice/cpp/src/Ice/WSConnector.cpp +113 -0
  419. data/ext/ice/cpp/src/Ice/WSConnector.h +51 -0
  420. data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +441 -0
  421. data/ext/ice/cpp/src/Ice/WSEndpoint.h +97 -0
  422. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +1728 -0
  423. data/ext/ice/cpp/src/Ice/WSTransceiver.h +149 -0
  424. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +594 -0
  425. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +1035 -0
  426. data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +208 -0
  427. data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +78 -0
  428. data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +308 -0
  429. data/ext/ice/cpp/src/IceDiscovery/LookupI.h +183 -0
  430. data/ext/ice/cpp/src/IceDiscovery/Makefile +61 -0
  431. data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +148 -0
  432. data/ext/ice/cpp/src/IceDiscovery/PluginI.h +39 -0
  433. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +258 -0
  434. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +66 -0
  435. data/ext/ice/cpp/src/IceSSL/Certificate.cpp +1334 -0
  436. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +42 -0
  437. data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +151 -0
  438. data/ext/ice/cpp/src/IceSSL/ConnectorI.h +56 -0
  439. data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +397 -0
  440. data/ext/ice/cpp/src/IceSSL/EndpointI.h +96 -0
  441. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +41 -0
  442. data/ext/ice/cpp/src/IceSSL/Instance.cpp +38 -0
  443. data/ext/ice/cpp/src/IceSSL/Instance.h +42 -0
  444. data/ext/ice/cpp/src/IceSSL/InstanceF.h +34 -0
  445. data/ext/ice/cpp/src/IceSSL/Makefile +82 -0
  446. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +1001 -0
  447. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +607 -0
  448. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +75 -0
  449. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +102 -0
  450. data/ext/ice/cpp/src/IceSSL/PluginI.h +56 -0
  451. data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +541 -0
  452. data/ext/ice/cpp/src/IceSSL/RFC2253.h +67 -0
  453. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +729 -0
  454. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +1062 -0
  455. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +130 -0
  456. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +291 -0
  457. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +264 -0
  458. data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +41 -0
  459. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +1514 -0
  460. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +609 -0
  461. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +91 -0
  462. data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +246 -0
  463. data/ext/ice/cpp/src/IceSSL/TrustManager.h +51 -0
  464. data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +26 -0
  465. data/ext/ice/cpp/src/IceSSL/Util.cpp +1423 -0
  466. data/ext/ice/cpp/src/IceSSL/Util.h +136 -0
  467. data/ext/ice/cpp/src/IceUtil/ArgVector.cpp +65 -0
  468. data/ext/ice/cpp/src/IceUtil/ArgVector.h +41 -0
  469. data/ext/ice/cpp/src/IceUtil/Cond.cpp +386 -0
  470. data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +477 -0
  471. data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +144 -0
  472. data/ext/ice/cpp/src/IceUtil/CountDownLatch.cpp +184 -0
  473. data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +273 -0
  474. data/ext/ice/cpp/src/IceUtil/Exception.cpp +782 -0
  475. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +532 -0
  476. data/ext/ice/cpp/src/IceUtil/FileUtil.h +159 -0
  477. data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +41 -0
  478. data/ext/ice/cpp/src/IceUtil/Makefile +68 -0
  479. data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +24 -0
  480. data/ext/ice/cpp/src/IceUtil/Options.cpp +1049 -0
  481. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +591 -0
  482. data/ext/ice/cpp/src/IceUtil/Random.cpp +185 -0
  483. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +257 -0
  484. data/ext/ice/cpp/src/IceUtil/SHA1.cpp +126 -0
  485. data/ext/ice/cpp/src/IceUtil/Shared.cpp +200 -0
  486. data/ext/ice/cpp/src/IceUtil/StopWatch.h +54 -0
  487. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +450 -0
  488. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +842 -0
  489. data/ext/ice/cpp/src/IceUtil/Thread.cpp +809 -0
  490. data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +172 -0
  491. data/ext/ice/cpp/src/IceUtil/Time.cpp +306 -0
  492. data/ext/ice/cpp/src/IceUtil/Timer.cpp +251 -0
  493. data/ext/ice/cpp/src/IceUtil/UUID.cpp +174 -0
  494. data/ext/ice/cpp/src/IceUtil/Unicode.cpp +131 -0
  495. data/ext/ice/cpp/src/IceUtil/Unicode.h +49 -0
  496. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +1139 -0
  497. data/ext/ice/cpp/src/Slice/Checksum.cpp +452 -0
  498. data/ext/ice/cpp/src/Slice/CsUtil.cpp +2650 -0
  499. data/ext/ice/cpp/src/Slice/DotNetNames.cpp +146 -0
  500. data/ext/ice/cpp/src/Slice/FileTracker.cpp +203 -0
  501. data/ext/ice/cpp/src/Slice/Grammar.cpp +4755 -0
  502. data/ext/ice/cpp/src/Slice/Grammar.h +98 -0
  503. data/ext/ice/cpp/src/Slice/GrammarUtil.h +234 -0
  504. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +4376 -0
  505. data/ext/ice/cpp/src/Slice/MD5.cpp +57 -0
  506. data/ext/ice/cpp/src/Slice/MD5.h +44 -0
  507. data/ext/ice/cpp/src/Slice/MD5I.cpp +385 -0
  508. data/ext/ice/cpp/src/Slice/MD5I.h +91 -0
  509. data/ext/ice/cpp/src/Slice/Makefile +65 -0
  510. data/ext/ice/cpp/src/Slice/PHPUtil.cpp +156 -0
  511. data/ext/ice/cpp/src/Slice/Parser.cpp +6386 -0
  512. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +686 -0
  513. data/ext/ice/cpp/src/Slice/Python.cpp +675 -0
  514. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +2614 -0
  515. data/ext/ice/cpp/src/Slice/Ruby.cpp +317 -0
  516. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +1774 -0
  517. data/ext/ice/cpp/src/Slice/Scanner.cpp +2426 -0
  518. data/ext/ice/cpp/src/Slice/Util.cpp +325 -0
  519. data/ext/ice/mcpp/config.h.Darwin +227 -0
  520. data/ext/ice/mcpp/config.h.Linux +227 -0
  521. data/ext/ice/mcpp/config.h.MINGW +7 -0
  522. data/ext/ice/mcpp/configed.H +382 -0
  523. data/ext/ice/mcpp/directive.c +1699 -0
  524. data/ext/ice/mcpp/eval.c +1673 -0
  525. data/ext/ice/mcpp/expand.c +2980 -0
  526. data/ext/ice/mcpp/internal.H +564 -0
  527. data/ext/ice/mcpp/main.c +1131 -0
  528. data/ext/ice/mcpp/mbchar.c +869 -0
  529. data/ext/ice/mcpp/mcpp_lib.h +31 -0
  530. data/ext/ice/mcpp/mcpp_out.h +13 -0
  531. data/ext/ice/mcpp/support.c +2811 -0
  532. data/ext/ice/mcpp/system.H +396 -0
  533. data/ext/ice/mcpp/system.c +4940 -0
  534. data/ice.gemspec +41 -0
  535. data/lib/Glacier2.rb +12 -0
  536. data/lib/Glacier2/Metrics.rb +99 -0
  537. data/lib/Glacier2/PermissionsVerifier.rb +168 -0
  538. data/lib/Glacier2/PermissionsVerifierF.rb +34 -0
  539. data/lib/Glacier2/Router.rb +141 -0
  540. data/lib/Glacier2/RouterF.rb +29 -0
  541. data/lib/Glacier2/SSLInfo.rb +79 -0
  542. data/lib/Glacier2/Session.rb +470 -0
  543. data/lib/Ice.rb +659 -0
  544. data/lib/Ice/BuiltinSequences.rb +64 -0
  545. data/lib/Ice/Communicator.rb +93 -0
  546. data/lib/Ice/CommunicatorF.rb +28 -0
  547. data/lib/Ice/Connection.rb +414 -0
  548. data/lib/Ice/ConnectionF.rb +36 -0
  549. data/lib/Ice/Current.rb +152 -0
  550. data/lib/Ice/Endpoint.rb +265 -0
  551. data/lib/Ice/EndpointF.rb +52 -0
  552. data/lib/Ice/EndpointTypes.rb +77 -0
  553. data/lib/Ice/FacetMap.rb +28 -0
  554. data/lib/Ice/Identity.rb +70 -0
  555. data/lib/Ice/ImplicitContext.rb +59 -0
  556. data/lib/Ice/ImplicitContextF.rb +28 -0
  557. data/lib/Ice/Instrumentation.rb +425 -0
  558. data/lib/Ice/InstrumentationF.rb +35 -0
  559. data/lib/Ice/LocalException.rb +1081 -0
  560. data/lib/Ice/Locator.rb +314 -0
  561. data/lib/Ice/LocatorF.rb +34 -0
  562. data/lib/Ice/Logger.rb +57 -0
  563. data/lib/Ice/LoggerF.rb +28 -0
  564. data/lib/Ice/Metrics.rb +696 -0
  565. data/lib/Ice/ObjectAdapterF.rb +28 -0
  566. data/lib/Ice/ObjectFactory.rb +53 -0
  567. data/lib/Ice/ObjectFactoryF.rb +28 -0
  568. data/lib/Ice/Plugin.rb +87 -0
  569. data/lib/Ice/PluginF.rb +32 -0
  570. data/lib/Ice/Process.rb +93 -0
  571. data/lib/Ice/ProcessF.rb +29 -0
  572. data/lib/Ice/Properties.rb +65 -0
  573. data/lib/Ice/PropertiesAdmin.rb +104 -0
  574. data/lib/Ice/PropertiesF.rb +33 -0
  575. data/lib/Ice/Router.rb +163 -0
  576. data/lib/Ice/RouterF.rb +29 -0
  577. data/lib/Ice/SliceChecksumDict.rb +28 -0
  578. data/lib/Ice/Version.rb +100 -0
  579. data/lib/IceBox.rb +10 -0
  580. data/lib/IceBox/IceBox.rb +272 -0
  581. data/lib/IceGrid.rb +17 -0
  582. data/lib/IceGrid/Admin.rb +1076 -0
  583. data/lib/IceGrid/Descriptor.rb +1505 -0
  584. data/lib/IceGrid/Exception.rb +401 -0
  585. data/lib/IceGrid/FileParser.rb +105 -0
  586. data/lib/IceGrid/Locator.rb +105 -0
  587. data/lib/IceGrid/Observer.rb +571 -0
  588. data/lib/IceGrid/Query.rb +168 -0
  589. data/lib/IceGrid/Registry.rb +120 -0
  590. data/lib/IceGrid/Session.rb +114 -0
  591. data/lib/IceGrid/UserAccountMapper.rb +101 -0
  592. data/lib/IcePatch2.rb +10 -0
  593. data/lib/IcePatch2/FileInfo.rb +75 -0
  594. data/lib/IcePatch2/FileServer.rb +141 -0
  595. data/lib/IceStorm.rb +11 -0
  596. data/lib/IceStorm/IceStorm.rb +463 -0
  597. data/lib/IceStorm/Metrics.rb +155 -0
  598. data/slice/Freeze/BackgroundSaveEvictor.ice +111 -0
  599. data/slice/Freeze/CatalogData.ice +49 -0
  600. data/slice/Freeze/Connection.ice +111 -0
  601. data/slice/Freeze/ConnectionF.ice +20 -0
  602. data/slice/Freeze/DB.ice +37 -0
  603. data/slice/Freeze/Evictor.ice +339 -0
  604. data/slice/Freeze/EvictorF.ice +22 -0
  605. data/slice/Freeze/EvictorStorage.ice +72 -0
  606. data/slice/Freeze/Exception.ice +100 -0
  607. data/slice/Freeze/Transaction.ice +57 -0
  608. data/slice/Freeze/TransactionalEvictor.ice +50 -0
  609. data/slice/Glacier2/Metrics.ice +77 -0
  610. data/slice/Glacier2/PermissionsVerifier.ice +105 -0
  611. data/slice/Glacier2/PermissionsVerifierF.ice +21 -0
  612. data/slice/Glacier2/Router.ice +178 -0
  613. data/slice/Glacier2/RouterF.ice +20 -0
  614. data/slice/Glacier2/SSLInfo.ice +50 -0
  615. data/slice/Glacier2/Session.ice +273 -0
  616. data/slice/Ice/BuiltinSequences.ice +48 -0
  617. data/slice/Ice/Communicator.ice +567 -0
  618. data/slice/Ice/CommunicatorF.ice +20 -0
  619. data/slice/Ice/Connection.ice +323 -0
  620. data/slice/Ice/ConnectionF.ice +22 -0
  621. data/slice/Ice/Current.ice +160 -0
  622. data/slice/Ice/Endpoint.ice +227 -0
  623. data/slice/Ice/EndpointF.ice +32 -0
  624. data/slice/Ice/EndpointTypes.ice +38 -0
  625. data/slice/Ice/FacetMap.ice +25 -0
  626. data/slice/Ice/Identity.ice +59 -0
  627. data/slice/Ice/ImplicitContext.ice +109 -0
  628. data/slice/Ice/ImplicitContextF.ice +20 -0
  629. data/slice/Ice/Instrumentation.ice +499 -0
  630. data/slice/Ice/InstrumentationF.ice +26 -0
  631. data/slice/Ice/LocalException.ice +1015 -0
  632. data/slice/Ice/Locator.ice +227 -0
  633. data/slice/Ice/LocatorF.ice +21 -0
  634. data/slice/Ice/Logger.ice +86 -0
  635. data/slice/Ice/LoggerF.ice +20 -0
  636. data/slice/Ice/Metrics.ice +422 -0
  637. data/slice/Ice/ObjectAdapter.ice +673 -0
  638. data/slice/Ice/ObjectAdapterF.ice +20 -0
  639. data/slice/Ice/ObjectFactory.ice +60 -0
  640. data/slice/Ice/ObjectFactoryF.ice +20 -0
  641. data/slice/Ice/Plugin.ice +117 -0
  642. data/slice/Ice/PluginF.ice +21 -0
  643. data/slice/Ice/Process.ice +54 -0
  644. data/slice/Ice/ProcessF.ice +20 -0
  645. data/slice/Ice/Properties.ice +228 -0
  646. data/slice/Ice/PropertiesAdmin.ice +75 -0
  647. data/slice/Ice/PropertiesF.ice +21 -0
  648. data/slice/Ice/RemoteLogger.ice +232 -0
  649. data/slice/Ice/Router.ice +83 -0
  650. data/slice/Ice/RouterF.ice +20 -0
  651. data/slice/Ice/ServantLocator.ice +117 -0
  652. data/slice/Ice/ServantLocatorF.ice +20 -0
  653. data/slice/Ice/SliceChecksumDict.ice +25 -0
  654. data/slice/Ice/Version.ice +39 -0
  655. data/slice/IceBox/IceBox.ice +194 -0
  656. data/slice/IceDiscovery/IceDiscovery.ice +32 -0
  657. data/slice/IceGrid/Admin.ice +1578 -0
  658. data/slice/IceGrid/Descriptor.ice +1079 -0
  659. data/slice/IceGrid/Discovery.ice +73 -0
  660. data/slice/IceGrid/Exception.ice +383 -0
  661. data/slice/IceGrid/FileParser.ice +61 -0
  662. data/slice/IceGrid/Locator.ice +56 -0
  663. data/slice/IceGrid/Observer.ice +394 -0
  664. data/slice/IceGrid/PluginFacade.ice +316 -0
  665. data/slice/IceGrid/Query.ice +130 -0
  666. data/slice/IceGrid/Registry.ice +138 -0
  667. data/slice/IceGrid/Session.ice +124 -0
  668. data/slice/IceGrid/UserAccountMapper.ice +58 -0
  669. data/slice/IcePatch2/FileInfo.ice +49 -0
  670. data/slice/IcePatch2/FileServer.ice +129 -0
  671. data/slice/IceSSL/ConnectionInfo.ice +34 -0
  672. data/slice/IceSSL/EndpointInfo.ice +41 -0
  673. data/slice/IceStorm/IceStorm.ice +405 -0
  674. data/slice/IceStorm/Metrics.ice +71 -0
  675. metadata +737 -0
@@ -0,0 +1,30 @@
1
+ // **********************************************************************
2
+ //
3
+ // Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
4
+ //
5
+ // This copy of Ice is licensed to you under the terms described in the
6
+ // ICE_LICENSE file included in this distribution.
7
+ //
8
+ // **********************************************************************
9
+
10
+ #ifndef ICE_ROUTER_INFO_F_H
11
+ #define ICE_ROUTER_INFO_F_H
12
+
13
+ #include <IceUtil/Shared.h>
14
+
15
+ #include <Ice/Handle.h>
16
+
17
+ namespace IceInternal
18
+ {
19
+
20
+ class RouterManager;
21
+ IceUtil::Shared* upCast(RouterManager*);
22
+ typedef Handle<RouterManager> RouterManagerPtr;
23
+
24
+ class RouterInfo;
25
+ IceUtil::Shared* upCast(RouterInfo*);
26
+ typedef Handle<RouterInfo> RouterInfoPtr;
27
+
28
+ }
29
+
30
+ #endif
@@ -0,0 +1,926 @@
1
+ // **********************************************************************
2
+ //
3
+ // Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
4
+ //
5
+ // This copy of Ice is licensed to you under the terms described in the
6
+ // ICE_LICENSE file included in this distribution.
7
+ //
8
+ // **********************************************************************
9
+
10
+ #include <Ice/Selector.h>
11
+ #include <Ice/EventHandler.h>
12
+ #include <Ice/Instance.h>
13
+ #include <Ice/LoggerUtil.h>
14
+ #include <Ice/LocalException.h>
15
+ #include <IceUtil/Time.h>
16
+
17
+ using namespace std;
18
+ using namespace IceInternal;
19
+
20
+ #ifdef ICE_OS_WINRT
21
+ using namespace Windows::Foundation;
22
+ using namespace Windows::Storage::Streams;
23
+ using namespace Windows::Networking;
24
+ using namespace Windows::Networking::Sockets;
25
+
26
+ Selector::Selector(const InstancePtr& instance) : _instance(instance)
27
+ {
28
+ }
29
+
30
+ void
31
+ Selector::destroy()
32
+ {
33
+ }
34
+
35
+ void
36
+ Selector::initialize(IceInternal::EventHandler* handler)
37
+ {
38
+ handler->__incRef();
39
+ handler->getNativeInfo()->setCompletedHandler(
40
+ ref new SocketOperationCompletedHandler([=](int operation)
41
+ {
42
+ completed(handler, static_cast<SocketOperation>(operation));
43
+ }));
44
+ }
45
+
46
+ void
47
+ Selector::update(IceInternal::EventHandler* handler, SocketOperation remove, SocketOperation add)
48
+ {
49
+ handler->_registered = static_cast<SocketOperation>(handler->_registered & ~remove);
50
+ handler->_registered = static_cast<SocketOperation>(handler->_registered | add);
51
+ if(add & SocketOperationRead && !(handler->_pending & SocketOperationRead))
52
+ {
53
+ handler->_pending = static_cast<SocketOperation>(handler->_pending | SocketOperationRead);
54
+ completed(handler, SocketOperationRead); // Start an asynchrnous read
55
+ }
56
+ else if(add & SocketOperationWrite && !(handler->_pending & SocketOperationWrite))
57
+ {
58
+ handler->_pending = static_cast<SocketOperation>(handler->_pending | SocketOperationWrite);
59
+ completed(handler, SocketOperationWrite); // Start an asynchrnous write
60
+ }
61
+ }
62
+
63
+ void
64
+ Selector::finish(IceInternal::EventHandler* handler)
65
+ {
66
+ handler->_registered = SocketOperationNone;
67
+ handler->__decRef();
68
+ }
69
+
70
+ IceInternal::EventHandler*
71
+ Selector::getNextHandler(SocketOperation& status, int timeout)
72
+ {
73
+ Lock lock(*this);
74
+ while(_events.empty())
75
+ {
76
+ if(timeout > 0)
77
+ {
78
+ timedWait(IceUtil::Time::seconds(timeout));
79
+ if(_events.empty())
80
+ {
81
+ throw SelectorTimeoutException();
82
+ }
83
+ }
84
+ else
85
+ {
86
+ wait();
87
+ }
88
+ }
89
+ assert(!_events.empty());
90
+ IceInternal::EventHandler* handler = _events.front().handler;
91
+ const SelectEvent& event = _events.front();
92
+ status = event.status;
93
+ _events.pop_front();
94
+ return handler;
95
+ }
96
+
97
+ void
98
+ Selector::completed(IceInternal::EventHandler* handler, SocketOperation op)
99
+ {
100
+ Lock lock(*this);
101
+ _events.push_back(SelectEvent(handler, op));
102
+ notify();
103
+ }
104
+
105
+ #elif defined(ICE_USE_IOCP)
106
+
107
+ Selector::Selector(const InstancePtr& instance) : _instance(instance)
108
+ {
109
+ }
110
+
111
+ Selector::~Selector()
112
+ {
113
+ }
114
+
115
+ void
116
+ Selector::setup(int sizeIO)
117
+ {
118
+ _handle = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, sizeIO);
119
+ if(_handle == NULL)
120
+ {
121
+ Ice::SocketException ex(__FILE__, __LINE__);
122
+ ex.error = GetLastError();
123
+ throw ex;
124
+ }
125
+ }
126
+
127
+ void
128
+ Selector::destroy()
129
+ {
130
+ CloseHandle(_handle);
131
+ }
132
+
133
+ void
134
+ Selector::initialize(EventHandler* handler)
135
+ {
136
+ HANDLE socket = reinterpret_cast<HANDLE>(handler->getNativeInfo()->fd());
137
+ if(CreateIoCompletionPort(socket, _handle, reinterpret_cast<ULONG_PTR>(handler), 0) == NULL)
138
+ {
139
+ Ice::SocketException ex(__FILE__, __LINE__);
140
+ ex.error = GetLastError();
141
+ throw ex;
142
+ }
143
+ handler->__incRef();
144
+ handler->getNativeInfo()->initialize(_handle, reinterpret_cast<ULONG_PTR>(handler));
145
+ }
146
+
147
+ void
148
+ Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation add)
149
+ {
150
+ handler->_registered = static_cast<SocketOperation>(handler->_registered & ~remove);
151
+ handler->_registered = static_cast<SocketOperation>(handler->_registered | add);
152
+ AsyncInfo* info = 0;
153
+ if(add & SocketOperationRead && !(handler->_pending & SocketOperationRead))
154
+ {
155
+ handler->_pending = static_cast<SocketOperation>(handler->_pending | SocketOperationRead);
156
+ info = handler->getNativeInfo()->getAsyncInfo(SocketOperationRead);
157
+ }
158
+ else if(add & SocketOperationWrite && !(handler->_pending & SocketOperationWrite))
159
+ {
160
+ handler->_pending = static_cast<SocketOperation>(handler->_pending | SocketOperationWrite);
161
+ info = handler->getNativeInfo()->getAsyncInfo(SocketOperationWrite);
162
+ }
163
+
164
+ if(info)
165
+ {
166
+ if(!PostQueuedCompletionStatus(_handle, 0, reinterpret_cast<ULONG_PTR>(handler), info))
167
+ {
168
+ Ice::SocketException ex(__FILE__, __LINE__);
169
+ ex.error = GetLastError();
170
+ throw ex;
171
+ }
172
+ }
173
+ }
174
+
175
+ void
176
+ Selector::finish(IceInternal::EventHandler* handler)
177
+ {
178
+ handler->_registered = SocketOperationNone;
179
+ handler->__decRef();
180
+ }
181
+
182
+ EventHandler*
183
+ Selector::getNextHandler(SocketOperation& status, DWORD& count, int& error, int timeout)
184
+ {
185
+ ULONG_PTR key;
186
+ LPOVERLAPPED ol;
187
+ error = 0;
188
+
189
+ if(!GetQueuedCompletionStatus(_handle, &count, &key, &ol, timeout > 0 ? timeout * 1000 : INFINITE))
190
+ {
191
+ int err = WSAGetLastError();
192
+ if(ol == 0)
193
+ {
194
+ if(err == WAIT_TIMEOUT)
195
+ {
196
+ throw SelectorTimeoutException();
197
+ }
198
+ else
199
+ {
200
+ {
201
+ Ice::SocketException ex(__FILE__, __LINE__, err);
202
+ Ice::Error out(_instance->initializationData().logger);
203
+ out << "fatal error: couldn't dequeue packet from completion port:\n" << ex;
204
+ }
205
+ abort();
206
+ }
207
+ }
208
+ AsyncInfo* info = static_cast<AsyncInfo*>(ol);
209
+ status = info->status;
210
+ count = SOCKET_ERROR;
211
+ error = WSAGetLastError();
212
+ return reinterpret_cast<EventHandler*>(key);
213
+ }
214
+
215
+ assert(ol);
216
+ AsyncInfo* info = static_cast<AsyncInfo*>(ol);
217
+ status = info->status;
218
+ return reinterpret_cast<EventHandler*>(key);
219
+ }
220
+
221
+ #elif defined(ICE_USE_KQUEUE) || defined(ICE_USE_EPOLL)
222
+
223
+ Selector::Selector(const InstancePtr& instance) : _instance(instance)
224
+ {
225
+ _events.resize(256);
226
+ #if defined(ICE_USE_EPOLL)
227
+ _queueFd = epoll_create(1);
228
+ if(_queueFd < 0)
229
+ {
230
+ Ice::SocketException ex(__FILE__, __LINE__);
231
+ ex.error = IceInternal::getSocketErrno();
232
+ throw ex;
233
+ }
234
+ #else
235
+ _queueFd = kqueue();
236
+ if(_queueFd < 0)
237
+ {
238
+ Ice::SocketException ex(__FILE__, __LINE__);
239
+ ex.error = getSocketErrno();
240
+ throw ex;
241
+ }
242
+ _selecting = false;
243
+ #endif
244
+ }
245
+
246
+ Selector::~Selector()
247
+ {
248
+ }
249
+
250
+ void
251
+ Selector::destroy()
252
+ {
253
+ try
254
+ {
255
+ closeSocket(_queueFd);
256
+ }
257
+ catch(const Ice::LocalException& ex)
258
+ {
259
+ Ice::Error out(_instance->initializationData().logger);
260
+ out << "exception in selector while calling closeSocket():\n" << ex;
261
+ }
262
+ }
263
+
264
+ void
265
+ Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation add)
266
+ {
267
+ SocketOperation previous = handler->_registered;
268
+ handler->_registered = static_cast<SocketOperation>(handler->_registered & ~remove);
269
+ handler->_registered = static_cast<SocketOperation>(handler->_registered | add);
270
+ if(previous == handler->_registered)
271
+ {
272
+ return;
273
+ }
274
+
275
+ SOCKET fd = handler->getNativeInfo()->fd();
276
+ #if defined(ICE_USE_EPOLL)
277
+ epoll_event event;
278
+ memset(&event, 0, sizeof(epoll_event));
279
+ event.data.ptr = handler;
280
+ SocketOperation status = handler->_registered;
281
+ if(handler->_disabled)
282
+ {
283
+ status = static_cast<SocketOperation>(status & ~handler->_disabled);
284
+ previous = static_cast<SocketOperation>(previous & ~handler->_disabled);
285
+ }
286
+ event.events |= status & SocketOperationRead ? EPOLLIN : 0;
287
+ event.events |= status & SocketOperationWrite ? EPOLLOUT : 0;
288
+ int op;
289
+ if(!previous && status)
290
+ {
291
+ op = EPOLL_CTL_ADD;
292
+ }
293
+ else if(previous && !status)
294
+ {
295
+ op = EPOLL_CTL_DEL;
296
+ }
297
+ else if(previous == status)
298
+ {
299
+ return;
300
+ }
301
+ else
302
+ {
303
+ op = EPOLL_CTL_MOD;
304
+ }
305
+ if(epoll_ctl(_queueFd, op, fd, &event) != 0)
306
+ {
307
+ Ice::Error out(_instance->initializationData().logger);
308
+ out << "error while updating selector:\n" << IceUtilInternal::errorToString(IceInternal::getSocketErrno());
309
+ }
310
+ #else // ICE_USE_KQUEUE
311
+ if(remove & SocketOperationRead)
312
+ {
313
+ struct kevent ev;
314
+ EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, handler);
315
+ _changes.push_back(ev);
316
+ }
317
+ if(remove & SocketOperationWrite)
318
+ {
319
+ struct kevent ev;
320
+ EV_SET(&ev, fd, EVFILT_WRITE, EV_DELETE, 0, 0, handler);
321
+ _changes.push_back(ev);
322
+ }
323
+ if(add & SocketOperationRead)
324
+ {
325
+ struct kevent ev;
326
+ EV_SET(&ev, fd, EVFILT_READ, EV_ADD | (handler->_disabled & SocketOperationRead ? EV_DISABLE : 0), 0, 0,
327
+ handler);
328
+ _changes.push_back(ev);
329
+ }
330
+ if(add & SocketOperationWrite)
331
+ {
332
+ struct kevent ev;
333
+ EV_SET(&ev, fd, EVFILT_WRITE, EV_ADD | (handler->_disabled & SocketOperationWrite ? EV_DISABLE : 0), 0, 0,
334
+ handler);
335
+ _changes.push_back(ev);
336
+ }
337
+ if(_selecting)
338
+ {
339
+ updateSelector();
340
+ }
341
+ #endif
342
+ }
343
+
344
+ void
345
+ Selector::enable(EventHandler* handler, SocketOperation status)
346
+ {
347
+ if(!(handler->_disabled & status))
348
+ {
349
+ return;
350
+ }
351
+ handler->_disabled = static_cast<SocketOperation>(handler->_disabled & ~status);
352
+
353
+ if(handler->_registered & status)
354
+ {
355
+ SOCKET fd = handler->getNativeInfo()->fd();
356
+ #if defined(ICE_USE_EPOLL)
357
+ SocketOperation previous = static_cast<SocketOperation>(handler->_registered & ~(handler->_disabled | status));
358
+ SocketOperation newStatus = static_cast<SocketOperation>(handler->_registered & ~handler->_disabled);
359
+ epoll_event event;
360
+ memset(&event, 0, sizeof(epoll_event));
361
+ event.data.ptr = handler;
362
+ event.events |= newStatus & SocketOperationRead ? EPOLLIN : 0;
363
+ event.events |= newStatus & SocketOperationWrite ? EPOLLOUT : 0;
364
+ if(epoll_ctl(_queueFd, previous ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &event) != 0)
365
+ {
366
+ Ice::Error out(_instance->initializationData().logger);
367
+ out << "error while updating selector:\n" << IceUtilInternal::errorToString(IceInternal::getSocketErrno());
368
+ }
369
+ #else // ICE_USE_KQUEUE
370
+ struct kevent ev;
371
+ EV_SET(&ev, fd, status == SocketOperationRead ? EVFILT_READ : EVFILT_WRITE, EV_ENABLE, 0, 0, handler);
372
+ _changes.push_back(ev);
373
+ if(_selecting)
374
+ {
375
+ updateSelector();
376
+ }
377
+ #endif
378
+ }
379
+ }
380
+
381
+ void
382
+ Selector::disable(EventHandler* handler, SocketOperation status)
383
+ {
384
+ if(handler->_disabled & status)
385
+ {
386
+ return;
387
+ }
388
+ handler->_disabled = static_cast<SocketOperation>(handler->_disabled | status);
389
+
390
+ if(handler->_registered & status)
391
+ {
392
+ SOCKET fd = handler->getNativeInfo()->fd();
393
+ #if defined(ICE_USE_EPOLL)
394
+ SocketOperation newStatus = static_cast<SocketOperation>(handler->_registered & ~handler->_disabled);
395
+ epoll_event event;
396
+ memset(&event, 0, sizeof(epoll_event));
397
+ event.data.ptr = handler;
398
+ event.events |= newStatus & SocketOperationRead ? EPOLLIN : 0;
399
+ event.events |= newStatus & SocketOperationWrite ? EPOLLOUT : 0;
400
+ if(epoll_ctl(_queueFd, newStatus ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, &event) != 0)
401
+ {
402
+ Ice::Error out(_instance->initializationData().logger);
403
+ out << "error while updating selector:\n" << IceUtilInternal::errorToString(IceInternal::getSocketErrno());
404
+ }
405
+ #else // ICE_USE_KQUEUE
406
+ struct kevent ev;
407
+ EV_SET(&ev, fd, status == SocketOperationRead ? EVFILT_READ : EVFILT_WRITE, EV_DISABLE, 0, 0, handler);
408
+ _changes.push_back(ev);
409
+ if(_selecting)
410
+ {
411
+ updateSelector();
412
+ }
413
+ #endif
414
+ }
415
+ }
416
+
417
+ bool
418
+ Selector::finish(EventHandler* handler, bool closeNow)
419
+ {
420
+ if(handler->_registered)
421
+ {
422
+ update(handler, handler->_registered, SocketOperationNone);
423
+ }
424
+ #if defined(ICE_USE_KQUEUE)
425
+ if(closeNow && !_changes.empty())
426
+ {
427
+ //
428
+ // Update selector now to remove the FD from the kqueue if
429
+ // we're going to close it now. This isn't necessary for
430
+ // epoll since we always update the epoll FD immediately.
431
+ //
432
+ updateSelector();
433
+ }
434
+ #endif
435
+ return closeNow;
436
+ }
437
+
438
+ #if defined(ICE_USE_KQUEUE)
439
+ void
440
+ Selector::updateSelector()
441
+ {
442
+ int rs = kevent(_queueFd, &_changes[0], _changes.size(), 0, 0, 0);
443
+ if(rs < 0)
444
+ {
445
+ Ice::Error out(_instance->initializationData().logger);
446
+ out << "error while updating selector:\n" << IceUtilInternal::errorToString(IceInternal::getSocketErrno());
447
+ }
448
+ _changes.clear();
449
+ }
450
+ #endif
451
+
452
+ void
453
+ Selector::select(vector<pair<EventHandler*, SocketOperation> >& handlers, int timeout)
454
+ {
455
+ int ret = 0;
456
+ while(true)
457
+ {
458
+ #if defined(ICE_USE_EPOLL)
459
+ ret = epoll_wait(_queueFd, &_events[0], _events.size(), timeout > 0 ? timeout * 1000 : -1);
460
+ #else
461
+ assert(!_events.empty());
462
+ if(timeout > 0)
463
+ {
464
+ struct timespec ts;
465
+ ts.tv_sec = timeout;
466
+ ts.tv_nsec = 0;
467
+ ret = kevent(_queueFd, 0, 0, &_events[0], _events.size(), &ts);
468
+ }
469
+ else
470
+ {
471
+ ret = kevent(_queueFd, 0, 0, &_events[0], _events.size(), 0);
472
+ }
473
+ #endif
474
+ if(ret == SOCKET_ERROR)
475
+ {
476
+ if(interrupted())
477
+ {
478
+ continue;
479
+ }
480
+
481
+ {
482
+ Ice::SocketException ex(__FILE__, __LINE__, IceInternal::getSocketErrno());
483
+ Ice::Error out(_instance->initializationData().logger);
484
+ out << "fatal error: selector failed:\n" << ex;
485
+ }
486
+ abort();
487
+ }
488
+ break;
489
+ }
490
+
491
+ if(ret == 0)
492
+ {
493
+ throw SelectorTimeoutException();
494
+ }
495
+
496
+ assert(ret > 0);
497
+ for(int i = 0; i < ret; ++i)
498
+ {
499
+ pair<EventHandler*, SocketOperation> p;
500
+ #if defined(ICE_USE_EPOLL)
501
+ struct epoll_event& ev = _events[i];
502
+ p.first = reinterpret_cast<EventHandler*>(ev.data.ptr);
503
+ p.second = static_cast<SocketOperation>(((ev.events & (EPOLLIN | EPOLLERR)) ?
504
+ SocketOperationRead : SocketOperationNone) |
505
+ ((ev.events & (EPOLLOUT | EPOLLERR)) ?
506
+ SocketOperationWrite : SocketOperationNone));
507
+ #else
508
+ struct kevent& ev = _events[i];
509
+ if(ev.flags & EV_ERROR)
510
+ {
511
+ Ice::Error out(_instance->initializationData().logger);
512
+ out << "selector returned error:\n" << IceUtilInternal::errorToString(ev.data);
513
+ continue;
514
+ }
515
+ p.first = reinterpret_cast<EventHandler*>(ev.udata);
516
+ p.second = (ev.filter == EVFILT_READ) ? SocketOperationRead : SocketOperationWrite;
517
+ #endif
518
+ handlers.push_back(p);
519
+ }
520
+ }
521
+
522
+ #elif defined(ICE_USE_SELECT) || defined(ICE_USE_POLL)
523
+
524
+ Selector::Selector(const InstancePtr& instance) : _instance(instance), _selecting(false), _interrupted(false)
525
+ {
526
+ SOCKET fds[2];
527
+ createPipe(fds);
528
+ _fdIntrRead = fds[0];
529
+ _fdIntrWrite = fds[1];
530
+ #if defined(ICE_USE_SELECT)
531
+ FD_ZERO(&_readFdSet);
532
+ FD_ZERO(&_writeFdSet);
533
+ FD_ZERO(&_errorFdSet);
534
+ FD_SET(_fdIntrRead, &_readFdSet);
535
+ #else
536
+ struct pollfd pollFd;
537
+ pollFd.fd = _fdIntrRead;
538
+ pollFd.events = POLLIN;
539
+ _pollFdSet.push_back(pollFd);
540
+ #endif
541
+ }
542
+
543
+ Selector::~Selector()
544
+ {
545
+ try
546
+ {
547
+ closeSocket(_fdIntrWrite);
548
+ }
549
+ catch(const Ice::LocalException& ex)
550
+ {
551
+ Ice::Error out(_instance->initializationData().logger);
552
+ out << "exception in selector while calling closeSocket():\n" << ex;
553
+ }
554
+
555
+ try
556
+ {
557
+ closeSocket(_fdIntrRead);
558
+ }
559
+ catch(const Ice::LocalException& ex)
560
+ {
561
+ Ice::Error out(_instance->initializationData().logger);
562
+ out << "exception in selector while calling closeSocket():\n" << ex;
563
+ }
564
+ }
565
+
566
+ void
567
+ Selector::destroy()
568
+ {
569
+ #if !defined(ICE_USE_SELECT) && !defined(ICE_USE_POLL)
570
+ assert(_events.empty());
571
+ #endif
572
+ }
573
+
574
+ void
575
+ Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation add)
576
+ {
577
+ SocketOperation previous = handler->_registered;
578
+ handler->_registered = static_cast<SocketOperation>(handler->_registered & ~remove);
579
+ handler->_registered = static_cast<SocketOperation>(handler->_registered | add);
580
+ if(previous == handler->_registered)
581
+ {
582
+ return;
583
+ }
584
+
585
+ updateImpl(handler);
586
+ }
587
+
588
+ void
589
+ Selector::enable(EventHandler* handler, SocketOperation status)
590
+ {
591
+ if(!(handler->_disabled & status))
592
+ {
593
+ return;
594
+ }
595
+ handler->_disabled = static_cast<SocketOperation>(handler->_disabled & ~status);
596
+
597
+ if(handler->_registered & status)
598
+ {
599
+ updateImpl(handler);
600
+ }
601
+ }
602
+
603
+ void
604
+ Selector::disable(EventHandler* handler, SocketOperation status)
605
+ {
606
+ if(handler->_disabled & status)
607
+ {
608
+ return;
609
+ }
610
+ handler->_disabled = static_cast<SocketOperation>(handler->_disabled | status);
611
+
612
+ if(handler->_registered & status)
613
+ {
614
+ updateImpl(handler);
615
+ }
616
+ }
617
+
618
+ bool
619
+ Selector::finish(EventHandler* handler, bool closeNow)
620
+ {
621
+ if(handler->_registered)
622
+ {
623
+ update(handler, handler->_registered, SocketOperationNone);
624
+ return false; // Don't close now if selecting.
625
+ }
626
+ return closeNow;
627
+ }
628
+
629
+ void
630
+ Selector::startSelect()
631
+ {
632
+ if(_interrupted)
633
+ {
634
+ char c;
635
+ while(true)
636
+ {
637
+ ssize_t ret;
638
+ #ifdef _WIN32
639
+ ret = ::recv(_fdIntrRead, &c, 1, 0);
640
+ #else
641
+ ret = ::read(_fdIntrRead, &c, 1);
642
+ #endif
643
+ if(ret == SOCKET_ERROR)
644
+ {
645
+ if(interrupted())
646
+ {
647
+ continue;
648
+ }
649
+
650
+ Ice::SocketException ex(__FILE__, __LINE__);
651
+ ex.error = IceInternal::getSocketErrno();
652
+ throw ex;
653
+ }
654
+ break;
655
+ }
656
+ _interrupted = false;
657
+
658
+ if(!_changes.empty())
659
+ {
660
+ updateSelector();
661
+ }
662
+ }
663
+ _selecting = true;
664
+ }
665
+
666
+ void
667
+ Selector::finishSelect()
668
+ {
669
+ _selecting = false;
670
+ }
671
+
672
+ void
673
+ Selector::select(vector<pair<EventHandler*, SocketOperation> >& handlers, int timeout)
674
+ {
675
+ int ret = 0;
676
+ while(true)
677
+ {
678
+ #if defined(ICE_USE_SELECT)
679
+ fd_set* rFdSet = fdSetCopy(_selectedReadFdSet, _readFdSet);
680
+ fd_set* wFdSet = fdSetCopy(_selectedWriteFdSet, _writeFdSet);
681
+ fd_set* eFdSet = fdSetCopy(_selectedErrorFdSet, _errorFdSet);
682
+ if(timeout > 0)
683
+ {
684
+ struct timeval tv;
685
+ tv.tv_sec = timeout;
686
+ tv.tv_usec = 0;
687
+ ret = ::select(0, rFdSet, wFdSet, eFdSet, &tv); // The first parameter is ignored on Windows
688
+ }
689
+ else
690
+ {
691
+ ret = ::select(0, rFdSet, wFdSet, eFdSet, 0); // The first parameter is ignored on Windows
692
+ }
693
+ #else
694
+ ret = poll(&_pollFdSet[0], _pollFdSet.size(), timeout > 0 ? timeout * 1000 : -1);
695
+ #endif
696
+ if(ret == SOCKET_ERROR)
697
+ {
698
+ if(interrupted())
699
+ {
700
+ continue;
701
+ }
702
+
703
+ {
704
+ Ice::SocketException ex(__FILE__, __LINE__, IceInternal::getSocketErrno());
705
+ Ice::Error out(_instance->initializationData().logger);
706
+ out << "fatal error: selector failed:\n" << ex;
707
+ }
708
+ abort();
709
+ }
710
+ break;
711
+ }
712
+
713
+ if(ret == 0)
714
+ {
715
+ throw SelectorTimeoutException();
716
+ }
717
+
718
+ assert(ret > 0);
719
+
720
+ #if defined(ICE_USE_SELECT)
721
+ if(_selectedReadFdSet.fd_count == 0 && _selectedWriteFdSet.fd_count == 0 && _selectedErrorFdSet.fd_count == 0)
722
+ {
723
+ Ice::Error out(_instance->initializationData().logger);
724
+ out << "select() in selector returned " << ret << " but no filedescriptor is ready";
725
+ return;
726
+ }
727
+
728
+ for(unsigned int i = 0; i < static_cast<unsigned int>(ret); ++i)
729
+ {
730
+ pair<EventHandler*, SocketOperation> p;
731
+
732
+ //
733
+ // Round robin for the filedescriptors.
734
+ //
735
+ SOCKET fd;
736
+ p.second = SocketOperationNone;
737
+ if(i < _selectedReadFdSet.fd_count)
738
+ {
739
+ fd = _selectedReadFdSet.fd_array[i];
740
+ p.second = static_cast<SocketOperation>(p.second | SocketOperationRead);
741
+ }
742
+ else if(i < _selectedWriteFdSet.fd_count + _selectedReadFdSet.fd_count)
743
+ {
744
+ fd = _selectedWriteFdSet.fd_array[i - _selectedReadFdSet.fd_count];
745
+ p.second = static_cast<SocketOperation>(p.second | SocketOperationWrite);
746
+ }
747
+ else
748
+ {
749
+ fd = _selectedErrorFdSet.fd_array[i - _selectedReadFdSet.fd_count - _selectedWriteFdSet.fd_count];
750
+ p.second = static_cast<SocketOperation>(p.second | SocketOperationConnect);
751
+ }
752
+
753
+ if(fd == _fdIntrRead) // Interrupted, we have to process the interrupt before returning any handlers
754
+ {
755
+ handlers.clear();
756
+ return;
757
+ }
758
+
759
+ assert(_handlers.find(fd) != _handlers.end());
760
+ p.first = _handlers[fd];
761
+ handlers.push_back(p);
762
+ }
763
+ #else
764
+ if(_pollFdSet[0].revents == POLLIN) // Interrupted, we have to process the interrupt before returning any handlers
765
+ {
766
+ return;
767
+ }
768
+
769
+ for(vector<struct pollfd>::const_iterator q = _pollFdSet.begin(); q != _pollFdSet.end(); ++q)
770
+ {
771
+ pair<EventHandler*, SocketOperation> p;
772
+ if(q->revents != 0)
773
+ {
774
+ SOCKET fd = q->fd;
775
+ assert(fd != _fdIntrRead);
776
+ assert(_handlers.find(fd) != _handlers.end());
777
+ p.first = _handlers[fd];
778
+ p.second = SocketOperationNone;
779
+ if(q->revents & (POLLIN | POLLERR | POLLHUP))
780
+ {
781
+ p.second = static_cast<SocketOperation>(p.second | SocketOperationRead);
782
+ }
783
+ if(q->revents & POLLOUT)
784
+ {
785
+ p.second = static_cast<SocketOperation>(p.second | SocketOperationWrite);
786
+ }
787
+ assert(p.second);
788
+ handlers.push_back(p);
789
+ }
790
+ }
791
+ #endif
792
+ }
793
+
794
+ void
795
+ Selector::updateImpl(EventHandler* handler)
796
+ {
797
+ SocketOperation status = static_cast<SocketOperation>(handler->_registered & ~handler->_disabled);
798
+ _changes.push_back(make_pair(handler, status));
799
+ if(_selecting)
800
+ {
801
+ if(!_interrupted)
802
+ {
803
+ char c = 0;
804
+ while(true)
805
+ {
806
+ #ifdef _WIN32
807
+ if(::send(_fdIntrWrite, &c, 1, 0) == SOCKET_ERROR)
808
+ #else
809
+ if(::write(_fdIntrWrite, &c, 1) == SOCKET_ERROR)
810
+ #endif
811
+ {
812
+ if(interrupted())
813
+ {
814
+ continue;
815
+ }
816
+
817
+ Ice::SocketException ex(__FILE__, __LINE__);
818
+ ex.error = IceInternal::getSocketErrno();
819
+ throw ex;
820
+ }
821
+ break;
822
+ }
823
+ _interrupted = true;
824
+ }
825
+ }
826
+ else
827
+ {
828
+ updateSelector();
829
+ }
830
+ }
831
+
832
+ void
833
+ Selector::updateSelector()
834
+ {
835
+ for(vector<pair<EventHandler*, SocketOperation> >::const_iterator p = _changes.begin(); p != _changes.end(); ++p)
836
+ {
837
+ EventHandler* handler = p->first;
838
+ SocketOperation status = p->second;
839
+
840
+ SOCKET fd = handler->getNativeInfo()->fd();
841
+ if(status)
842
+ {
843
+ #if defined(ICE_USE_SELECT)
844
+ if(status & SocketOperationRead)
845
+ {
846
+ FD_SET(fd, &_readFdSet);
847
+ }
848
+ else
849
+ {
850
+ FD_CLR(fd, &_readFdSet);
851
+ }
852
+ if(status & SocketOperationWrite)
853
+ {
854
+ FD_SET(fd, &_writeFdSet);
855
+ }
856
+ else
857
+ {
858
+ FD_CLR(fd, &_writeFdSet);
859
+ }
860
+ if(status & SocketOperationConnect)
861
+ {
862
+ FD_SET(fd, &_writeFdSet);
863
+ FD_SET(fd, &_errorFdSet);
864
+ }
865
+ else
866
+ {
867
+ FD_CLR(fd, &_writeFdSet);
868
+ FD_CLR(fd, &_errorFdSet);
869
+ }
870
+ _handlers[fd] = handler;
871
+ #else
872
+ short events = 0;
873
+ if(status & SocketOperationRead)
874
+ {
875
+ events |= POLLIN;
876
+ }
877
+ if(status & SocketOperationWrite)
878
+ {
879
+ events |= POLLOUT;
880
+ }
881
+ map<SOCKET, EventHandler*>::const_iterator q = _handlers.find(fd);
882
+ if(q == _handlers.end())
883
+ {
884
+ struct pollfd pollFd;
885
+ pollFd.fd = fd;
886
+ pollFd.events = events;
887
+ pollFd.revents = 0;
888
+ _pollFdSet.push_back(pollFd);
889
+ _handlers.insert(make_pair(fd, handler));
890
+ }
891
+ else
892
+ {
893
+ for(vector<struct pollfd>::iterator r = _pollFdSet.begin(); r != _pollFdSet.end(); ++r)
894
+ {
895
+ if(r->fd == fd)
896
+ {
897
+ r->events = events;
898
+ break;
899
+ }
900
+ }
901
+ }
902
+ #endif
903
+ }
904
+ else
905
+ {
906
+ #if defined(ICE_USE_SELECT)
907
+ FD_CLR(fd, &_readFdSet);
908
+ FD_CLR(fd, &_writeFdSet);
909
+ FD_CLR(fd, &_errorFdSet);
910
+ #else
911
+ for(vector<struct pollfd>::iterator r = _pollFdSet.begin(); r != _pollFdSet.end(); ++r)
912
+ {
913
+ if(r->fd == fd)
914
+ {
915
+ _pollFdSet.erase(r);
916
+ break;
917
+ }
918
+ }
919
+ #endif
920
+ _handlers.erase(fd);
921
+ }
922
+ }
923
+ _changes.clear();
924
+ }
925
+
926
+ #endif