zeroc-ice 3.8.1 → 3.8.3

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 (280) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Communicator.cpp +26 -9
  3. data/dist/IceRuby/Config.h +0 -12
  4. data/dist/IceRuby/Connection.cpp +18 -9
  5. data/dist/IceRuby/DefaultSliceLoader.h +1 -1
  6. data/dist/IceRuby/Endpoint.cpp +21 -8
  7. data/dist/IceRuby/Operation.cpp +29 -11
  8. data/dist/IceRuby/Properties.cpp +3 -4
  9. data/dist/IceRuby/Proxy.cpp +11 -19
  10. data/dist/IceRuby/RubySliceLoader.cpp +1 -1
  11. data/dist/IceRuby/RubySliceLoader.h +6 -0
  12. data/dist/IceRuby/Types.cpp +162 -138
  13. data/dist/IceRuby/Types.h +68 -28
  14. data/dist/IceRuby/Util.cpp +14 -78
  15. data/dist/IceRuby/Util.h +7 -17
  16. data/dist/ice/cpp/include/Ice/Communicator.h +31 -8
  17. data/dist/ice/cpp/include/Ice/Config.h +2 -2
  18. data/dist/ice/cpp/include/Ice/Connection.h +24 -8
  19. data/dist/ice/cpp/include/Ice/CtrlCHandler.h +1 -1
  20. data/dist/ice/cpp/include/Ice/Demangle.h +1 -1
  21. data/dist/ice/cpp/include/Ice/Endpoint.h +4 -4
  22. data/dist/ice/cpp/include/Ice/Initialize.h +4 -4
  23. data/dist/ice/cpp/include/Ice/InputStream.h +5 -5
  24. data/dist/ice/cpp/include/Ice/Instrumentation.h +13 -7
  25. data/dist/ice/cpp/include/Ice/LocalExceptions.h +26 -5
  26. data/dist/ice/cpp/include/Ice/Logger.h +7 -0
  27. data/dist/ice/cpp/include/Ice/LoggerUtil.h +1 -1
  28. data/dist/ice/cpp/include/Ice/Object.h +10 -8
  29. data/dist/ice/cpp/include/Ice/ObjectAdapter.h +1 -1
  30. data/dist/ice/cpp/include/Ice/OutgoingAsync.h +5 -2
  31. data/dist/ice/cpp/include/Ice/OutgoingResponse.h +2 -1
  32. data/dist/ice/cpp/include/Ice/OutputStream.h +14 -11
  33. data/dist/ice/cpp/include/Ice/PluginFactory.h +1 -1
  34. data/dist/ice/cpp/include/Ice/Properties.h +3 -3
  35. data/dist/ice/cpp/include/Ice/Proxy.h +192 -50
  36. data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +3 -3
  37. data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +1 -1
  38. data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +5 -5
  39. data/dist/ice/cpp/include/Ice/ServantLocator.h +1 -1
  40. data/dist/ice/cpp/include/Ice/Service.h +2 -5
  41. data/dist/ice/cpp/include/Ice/SliceLoader.h +1 -1
  42. data/dist/ice/cpp/include/Ice/SlicedData.h +5 -3
  43. data/dist/ice/cpp/include/Ice/StreamHelpers.h +1 -1
  44. data/dist/ice/cpp/include/Ice/StreamableTraits.h +2 -2
  45. data/dist/ice/cpp/include/Ice/StringConverter.h +2 -3
  46. data/dist/ice/cpp/include/Ice/StringUtil.h +2 -7
  47. data/dist/ice/cpp/include/Ice/UUID.h +1 -0
  48. data/dist/ice/cpp/include/Ice/Value.h +2 -2
  49. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
  50. data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
  51. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
  52. data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
  53. data/dist/ice/cpp/include/generated/Ice/Locator.h +57 -23
  54. data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +38 -11
  55. data/dist/ice/cpp/include/generated/Ice/Metrics.h +99 -44
  56. data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
  57. data/dist/ice/cpp/include/generated/Ice/Process.h +34 -8
  58. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +42 -11
  59. data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
  60. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +93 -40
  61. data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +8 -4
  62. data/dist/ice/cpp/include/generated/Ice/Router.h +55 -19
  63. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
  64. data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
  65. data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +66 -14
  66. data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +34 -8
  67. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +1 -1
  68. data/dist/ice/cpp/src/Ice/Base64.cpp +47 -137
  69. data/dist/ice/cpp/src/Ice/Base64.h +2 -2
  70. data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +28 -13
  71. data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +5 -1
  72. data/dist/ice/cpp/src/Ice/Buffer.cpp +1 -1
  73. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +6 -4
  74. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
  75. data/dist/ice/cpp/src/Ice/Communicator.cpp +4 -3
  76. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +8 -0
  77. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +5 -15
  78. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
  79. data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +6 -8
  80. data/dist/ice/cpp/src/Ice/ConnectionFactory.h +0 -3
  81. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +121 -108
  82. data/dist/ice/cpp/src/Ice/ConnectionI.h +12 -9
  83. data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +1 -1
  84. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -14
  85. data/dist/ice/cpp/src/Ice/EndpointI.h +1 -1
  86. data/dist/ice/cpp/src/Ice/FileUtil.cpp +15 -79
  87. data/dist/ice/cpp/src/Ice/FileUtil.h +0 -3
  88. data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +1 -1
  89. data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +1 -1
  90. data/dist/ice/cpp/src/Ice/HttpParser.h +0 -2
  91. data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +4 -0
  92. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +6 -3
  93. data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +2 -4
  94. data/dist/ice/cpp/src/Ice/InputStream.cpp +50 -33
  95. data/dist/ice/cpp/src/Ice/Instance.cpp +73 -50
  96. data/dist/ice/cpp/src/Ice/Instance.h +1 -6
  97. data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +7 -1
  98. data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +2 -2
  99. data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +13 -18
  100. data/dist/ice/cpp/src/Ice/LoggerI.cpp +1 -1
  101. data/dist/ice/cpp/src/Ice/LoggerI.h +2 -2
  102. data/dist/ice/cpp/src/Ice/MetricsAdminI.h +6 -1
  103. data/dist/ice/cpp/src/Ice/MetricsObserverI.h +22 -18
  104. data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +5 -2
  105. data/dist/ice/cpp/src/Ice/Network.cpp +168 -103
  106. data/dist/ice/cpp/src/Ice/Network.h +12 -7
  107. data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +17 -6
  108. data/dist/ice/cpp/src/Ice/NetworkProxy.h +2 -1
  109. data/dist/ice/cpp/src/Ice/Object.cpp +1 -1
  110. data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +56 -19
  111. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +10 -10
  112. data/dist/ice/cpp/src/Ice/Options.cpp +7 -2
  113. data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +2 -2
  114. data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +127 -127
  115. data/dist/ice/cpp/src/Ice/OutgoingResponseInternal.h +21 -0
  116. data/dist/ice/cpp/src/Ice/OutputStream.cpp +50 -65
  117. data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +7 -1
  118. data/dist/ice/cpp/src/Ice/Properties.cpp +26 -16
  119. data/dist/ice/cpp/src/Ice/PropertyNames.cpp +2 -1
  120. data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +1 -1
  121. data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -11
  122. data/dist/ice/cpp/src/Ice/ProtocolInstance.h +1 -2
  123. data/dist/ice/cpp/src/Ice/Proxy.cpp +9 -1
  124. data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +110 -13
  125. data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +4 -4
  126. data/dist/ice/cpp/src/Ice/Random.cpp +68 -7
  127. data/dist/ice/cpp/src/Ice/Random.h +6 -2
  128. data/dist/ice/cpp/src/Ice/Reference.cpp +37 -26
  129. data/dist/ice/cpp/src/Ice/Reference.h +3 -0
  130. data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +26 -13
  131. data/dist/ice/cpp/src/Ice/RequestHandler.h +3 -1
  132. data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +1 -1
  133. data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +1 -1
  134. data/dist/ice/cpp/src/Ice/ResourceConfig.h +3 -3
  135. data/dist/ice/cpp/src/Ice/RetryQueue.cpp +8 -12
  136. data/dist/ice/cpp/src/Ice/SHA1.cpp +11 -11
  137. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +0 -6
  138. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +0 -6
  139. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +27 -12
  140. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +1 -2
  141. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +77 -27
  142. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +2 -1
  143. data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +2 -2
  144. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +1 -1
  145. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +1 -4
  146. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +39 -34
  147. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +165 -80
  148. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +1 -5
  149. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +73 -33
  150. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +0 -1
  151. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +110 -17
  152. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +7 -2
  153. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +9 -3
  154. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +73 -51
  155. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +0 -8
  156. data/dist/ice/cpp/src/Ice/Selector.cpp +13 -11
  157. data/dist/ice/cpp/src/Ice/ServantManager.cpp +3 -3
  158. data/dist/ice/cpp/src/Ice/Service.cpp +33 -115
  159. data/dist/ice/cpp/src/Ice/StreamSocket.cpp +33 -40
  160. data/dist/ice/cpp/src/Ice/StreamSocket.h +4 -4
  161. data/dist/ice/cpp/src/Ice/StringConverter.cpp +1 -1
  162. data/dist/ice/cpp/src/Ice/StringUtil.cpp +12 -21
  163. data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +136 -100
  164. data/dist/ice/cpp/src/Ice/SysLoggerI.h +7 -3
  165. data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +1 -1
  166. data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +7 -7
  167. data/dist/ice/cpp/src/Ice/TcpAcceptor.h +2 -1
  168. data/dist/ice/cpp/src/Ice/TcpBufSize.h +40 -0
  169. data/dist/ice/cpp/src/Ice/TcpConnector.cpp +5 -2
  170. data/dist/ice/cpp/src/Ice/TcpConnector.h +2 -0
  171. data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +2 -2
  172. data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -2
  173. data/dist/ice/cpp/src/Ice/ThreadPool.cpp +2 -8
  174. data/dist/ice/cpp/src/Ice/ThreadPool.h +0 -2
  175. data/dist/ice/cpp/src/Ice/Timer.cpp +7 -3
  176. data/dist/ice/cpp/src/Ice/UUID.cpp +1 -2
  177. data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +6 -3
  178. data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +136 -123
  179. data/dist/ice/cpp/src/Ice/UdpTransceiver.h +3 -4
  180. data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +8 -3
  181. data/dist/ice/cpp/src/Ice/WSAcceptor.h +5 -1
  182. data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +45 -2
  183. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +214 -34
  184. data/dist/ice/cpp/src/Ice/WSTransceiver.h +13 -2
  185. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
  186. data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
  187. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
  188. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
  189. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
  190. data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
  191. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
  192. data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
  193. data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
  194. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
  195. data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
  196. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
  197. data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +4 -2
  198. data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
  199. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
  200. data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
  201. data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +47 -9
  202. data/dist/ice/cpp/src/IceDiscovery/LookupI.h +8 -3
  203. data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
  204. data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +43 -14
  205. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
  206. data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +32 -26
  207. data/dist/ice/cpp/src/Slice/DocCommentParser.h +6 -4
  208. data/dist/ice/cpp/src/Slice/FileTracker.cpp +3 -11
  209. data/dist/ice/cpp/src/Slice/FileTracker.h +0 -2
  210. data/dist/ice/cpp/src/Slice/Grammar.cpp +211 -210
  211. data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +34 -14
  212. data/dist/ice/cpp/src/Slice/MetadataValidation.h +3 -2
  213. data/dist/ice/cpp/src/Slice/Parser.cpp +145 -97
  214. data/dist/ice/cpp/src/Slice/Parser.h +22 -8
  215. data/dist/ice/cpp/src/Slice/Preprocessor.cpp +77 -29
  216. data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -3
  217. data/dist/ice/cpp/src/Slice/Scanner.cpp +3 -3
  218. data/dist/ice/cpp/src/Slice/SliceUtil.cpp +203 -172
  219. data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -2
  220. data/dist/ice/cpp/src/Slice/Util.h +21 -12
  221. data/dist/ice/cpp/src/slice2rb/Ruby.cpp +7 -3
  222. data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +26 -20
  223. data/dist/ice/cpp/src/slice2rb/RubyUtil.h +10 -13
  224. data/dist/ice/slice/Glacier2/Router.ice +3 -3
  225. data/dist/ice/slice/Ice/Identity.ice +3 -0
  226. data/dist/ice/slice/Ice/Locator.ice +6 -5
  227. data/dist/ice/slice/Ice/LocatorRegistry.ice +3 -0
  228. data/dist/ice/slice/Ice/Metrics.ice +7 -6
  229. data/dist/ice/slice/Ice/OperationMode.ice +8 -0
  230. data/dist/ice/slice/Ice/Process.ice +3 -0
  231. data/dist/ice/slice/Ice/RemoteLogger.ice +5 -5
  232. data/dist/ice/slice/Ice/ReplyStatus.ice +13 -0
  233. data/dist/ice/slice/IceGrid/Admin.ice +9 -9
  234. data/dist/ice/slice/IceGrid/Descriptor.ice +5 -5
  235. data/dist/ice/slice/IceStorm/Metrics.ice +1 -1
  236. data/dist/lib/Glacier2/Metrics.rb +1 -1
  237. data/dist/lib/Glacier2/PermissionsVerifier.rb +3 -3
  238. data/dist/lib/Glacier2/Router.rb +9 -9
  239. data/dist/lib/Glacier2/SSLInfo.rb +1 -1
  240. data/dist/lib/Glacier2/Session.rb +15 -15
  241. data/dist/lib/Ice/BuiltinSequences.rb +1 -1
  242. data/dist/lib/Ice/CompressBatch.rb +1 -2
  243. data/dist/lib/Ice/Context.rb +1 -1
  244. data/dist/lib/Ice/EndpointSelectionType.rb +1 -2
  245. data/dist/lib/Ice/EndpointTypes.rb +1 -1
  246. data/dist/lib/Ice/Identity.rb +1 -1
  247. data/dist/lib/Ice/IdentitySpaceship.rb +1 -0
  248. data/dist/lib/Ice/LocalExceptions.rb +3 -0
  249. data/dist/lib/Ice/Locator.rb +5 -5
  250. data/dist/lib/Ice/LocatorRegistry.rb +4 -4
  251. data/dist/lib/Ice/Metrics.rb +7 -7
  252. data/dist/lib/Ice/OperationMode.rb +2 -3
  253. data/dist/lib/Ice/Process.rb +3 -3
  254. data/dist/lib/Ice/PropertiesAdmin.rb +4 -4
  255. data/dist/lib/Ice/PropertyDict.rb +1 -1
  256. data/dist/lib/Ice/ProxyFunctions.rb +8 -4
  257. data/dist/lib/Ice/RemoteLogger.rb +7 -8
  258. data/dist/lib/Ice/ReplyStatus.rb +4 -4
  259. data/dist/lib/Ice/Router.rb +5 -5
  260. data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
  261. data/dist/lib/Ice/SliceUtil.rb +2 -2
  262. data/dist/lib/Ice/Struct.rb +1 -0
  263. data/dist/lib/Ice/ToStringMode.rb +1 -2
  264. data/dist/lib/Ice/Value.rb +2 -2
  265. data/dist/lib/Ice/Version.rb +1 -1
  266. data/dist/lib/IceBox/ServiceManager.rb +8 -8
  267. data/dist/lib/IceGrid/Admin.rb +85 -86
  268. data/dist/lib/IceGrid/Descriptor.rb +1 -1
  269. data/dist/lib/IceGrid/Exception.rb +1 -1
  270. data/dist/lib/IceGrid/FileParser.rb +2 -2
  271. data/dist/lib/IceGrid/Registry.rb +14 -15
  272. data/dist/lib/IceGrid/Session.rb +7 -7
  273. data/dist/lib/IceGrid/UserAccountMapper.rb +2 -2
  274. data/dist/lib/IceStorm/IceStorm.rb +16 -16
  275. data/dist/lib/IceStorm/Metrics.rb +1 -1
  276. data/extconf.rb +1 -1
  277. data/ice.gemspec +3 -3
  278. metadata +5 -5
  279. data/dist/ice/cpp/src/Ice/DLLMain.cpp +0 -40
  280. data/dist/ice/cpp/src/Ice/UndefSysMacros.h +0 -37
@@ -25,7 +25,6 @@
25
25
  # pragma warning(disable : 4251) // class ... needs to have dll-interface to be used by clients of class ...
26
26
  #elif defined(__clang__)
27
27
  # pragma clang diagnostic push
28
- // See #2747
29
28
  # pragma clang diagnostic ignored "-Wshadow-uncaptured-local"
30
29
  # pragma clang diagnostic ignored "-Wweak-vtables"
31
30
  #endif
@@ -143,7 +142,7 @@ namespace IceInternal
143
142
  //
144
143
  // Base class for proxy based invocations. This class handles the
145
144
  // retry for proxy invocations. It also ensures the child observer is
146
- // correct notified of failures and make sure the retry task is
145
+ // correctly notified of failures and makes sure the retry task is
147
146
  // correctly canceled when the invocation completes.
148
147
  //
149
148
  class ICE_API ProxyOutgoingAsyncBase : public OutgoingAsyncBase, public TimerTask
@@ -155,7 +154,11 @@ namespace IceInternal
155
154
  bool exception(std::exception_ptr) override;
156
155
 
157
156
  void retryException();
157
+
158
+ // Retries the invocation; when the retry attempt fails, completes the invocation with the exception. This
159
+ // function never throws.
158
160
  void retry();
161
+
159
162
  void abort(std::exception_ptr);
160
163
 
161
164
  std::shared_ptr<ProxyOutgoingAsyncBase> shared_from_this()
@@ -64,7 +64,8 @@ namespace Ice
64
64
  /// Gets the exception ID of the response.
65
65
  /// @return The exception ID of the response. It's empty when #replyStatus is ReplyStatus::Ok or
66
66
  /// ReplyStatus::UserException. Otherwise, this ID is the value returned by LocalException#ice_id. For other
67
- /// exceptions, this ID is the value returned by `std::exception::what()`.
67
+ /// exceptions, this ID is the demangled name of the exception type, or `"unknown"` when the dispatch throws a
68
+ /// value that is not derived from `std::exception`.
68
69
  [[nodiscard]] const std::string& exceptionId() const noexcept { return _exceptionId; }
69
70
 
70
71
  /// Gets the full details of the exception marshaled into the response.
@@ -42,8 +42,9 @@ namespace Ice
42
42
  /// Constructs an OutputStream.
43
43
  /// @param encoding The encoding version to use.
44
44
  /// @param format The class format to use.
45
- /// @param stringConverter The narrow string converter to use.
46
- /// @param wstringConverter The wide string converter to use.
45
+ /// @param stringConverter The narrow string converter to use. @c nullptr means do not perform any conversion.
46
+ /// @param wstringConverter The wide string converter to use. @c nullptr is equivalent to the process wstring
47
+ /// converter.
47
48
  OutputStream(
48
49
  EncodingVersion encoding = Encoding_1_1,
49
50
  FormatType format = FormatType::CompactFormat,
@@ -66,8 +67,9 @@ namespace Ice
66
67
  /// stream will reallocate if the size of the marshaled data exceeds the application's buffer.
67
68
  /// @param encoding The encoding version to use.
68
69
  /// @param format The class format to use.
69
- /// @param stringConverter The narrow string converter to use.
70
- /// @param wstringConverter The wide string converter to use.
70
+ /// @param stringConverter The narrow string converter to use. @c nullptr means do not perform any conversion.
71
+ /// @param wstringConverter The wide string converter to use. @c nullptr is equivalent to the process wstring
72
+ /// converter.
71
73
  OutputStream(
72
74
  std::pair<const std::byte*, const std::byte*> bytes,
73
75
  EncodingVersion encoding = Encoding_1_1,
@@ -120,8 +122,8 @@ namespace Ice
120
122
  void resize(Container::size_type sz) { b.resize(sz); }
121
123
 
122
124
  /// Marks the start of a class instance.
123
- /// @param data Contains the marshaled form of unknown slices from the class instance. If not nullptr, these
124
- /// slices will be marshaled with the instance.
125
+ /// @param data Contains the marshaled form of unknown slices from the class instance. These slices are
126
+ /// marshaled with the instance only when this stream uses the sliced format; otherwise they are ignored.
125
127
  void startValue(const SlicedDataPtr& data)
126
128
  {
127
129
  assert(_currentEncaps && _currentEncaps->encoder);
@@ -149,7 +151,8 @@ namespace Ice
149
151
  _currentEncaps->encoder->endInstance();
150
152
  }
151
153
 
152
- /// Writes the start of an encapsulation using the default encoding version and class encoding format.
154
+ /// Writes the start of an encapsulation. A nested encapsulation uses the encoding version and class format of
155
+ /// the enclosing encapsulation; a top-level encapsulation uses the stream's encoding version and class format.
153
156
  void startEncapsulation();
154
157
 
155
158
  /// Writes the start of an encapsulation using the specified encoding version and class encoding format.
@@ -260,7 +263,7 @@ namespace Ice
260
263
  {
261
264
  Container::size_type position = b.size();
262
265
  resize(position + sz);
263
- memcpy(&b[position], &v[0], sz);
266
+ memcpy(&b[position], v, sz);
264
267
  }
265
268
  }
266
269
 
@@ -281,7 +284,7 @@ namespace Ice
281
284
  /// @tparam Te The types of the values in the tuple, starting at index @p I.
282
285
  /// @param tuple The tuple to marshal.
283
286
  // Declared here because the actual definition below breaks doxygen 1.13.2.
284
- template<size_t I = 0, typename... Te >> writeAll(std::tuple<Te...> tuple);
287
+ template<size_t I = 0, typename... Te> void writeAll(std::tuple<Te...> tuple);
285
288
  #endif
286
289
 
287
290
  /// Writes a value (single element list) to the stream.
@@ -399,7 +402,7 @@ namespace Ice
399
402
  }
400
403
  else
401
404
  {
402
- write(&v[0], &v[0] + v.size());
405
+ write(v.data(), v.data() + v.size());
403
406
  }
404
407
  }
405
408
 
@@ -697,7 +700,7 @@ namespace Ice
697
700
  }
698
701
 
699
702
  StringConverterPtr _stringConverter;
700
- WstringConverterPtr _wstringConverter;
703
+ WstringConverterPtr _wstringConverter; // never null
701
704
 
702
705
  //
703
706
  // The public stream API needs to attach data to a stream.
@@ -25,7 +25,7 @@ namespace Ice
25
25
  const StringSeq& args);
26
26
 
27
27
  /// Represents a plug-in factory.
28
- /// @see InitializeData::pluginFactories
28
+ /// @see InitializationData::pluginFactories
29
29
  struct PluginFactory
30
30
  {
31
31
  /// The default and preferred name for plug-ins created by this factory.
@@ -188,7 +188,7 @@ namespace Ice
188
188
  /// Gets a property as a list of strings. The strings must be separated by whitespace or comma. The strings in
189
189
  /// the list can contain whitespace and commas if they are enclosed in single or double quotes. If quotes are
190
190
  /// mismatched, an empty list is returned. Within single quotes or double quotes, you can escape the quote in
191
- /// question with a backslash, e.g. O'Reilly can be written as O'Reilly, "O'Reilly" or 'O\'Reilly'.
191
+ /// question with a backslash, e.g. O'Reilly can be written as "O'Reilly" or 'O\'Reilly'.
192
192
  /// @param key The property key.
193
193
  /// @return The property value interpreted as a list of strings, or an empty list if the property is not set.
194
194
  /// @see #setProperty
@@ -197,7 +197,7 @@ namespace Ice
197
197
  /// Gets an Ice property as a list of strings. The strings must be separated by whitespace or comma. The strings
198
198
  /// in the list can contain whitespace and commas if they are enclosed in single or double quotes. If quotes are
199
199
  /// mismatched, the default list is returned. Within single quotes or double quotes, you can escape the quote
200
- /// in question with a backslash, e.g. O'Reilly can be written as O'Reilly, "O'Reilly" or 'O\'Reilly'.
200
+ /// in question with a backslash, e.g. O'Reilly can be written as "O'Reilly" or 'O\'Reilly'.
201
201
  /// @param key The property key.
202
202
  /// @return The property value interpreted as a list of strings, or the default value if the property is not
203
203
  /// set.
@@ -208,7 +208,7 @@ namespace Ice
208
208
  /// Gets a property as a list of strings. The strings must be separated by whitespace or comma. The strings in
209
209
  /// the list can contain whitespace and commas if they are enclosed in single or double quotes. If quotes are
210
210
  /// mismatched, the default list is returned. Within single quotes or double quotes, you can escape the quote
211
- /// in question with a backslash, e.g. O'Reilly can be written as O'Reilly, "O'Reilly" or 'O\'Reilly'.
211
+ /// in question with a backslash, e.g. O'Reilly can be written as "O'Reilly" or 'O\'Reilly'.
212
212
  /// @param key The property key.
213
213
  /// @param value The default value to use if the property is not set.
214
214
  /// @return The property value interpreted as a list of strings, or the default value if the property is not
@@ -14,10 +14,13 @@
14
14
  #include "RequestHandlerF.h"
15
15
 
16
16
  #include <chrono>
17
+ #include <cstdint>
17
18
  #include <functional>
18
19
  #include <future>
19
20
  #include <iosfwd>
21
+ #include <limits>
20
22
  #include <optional>
23
+ #include <stdexcept>
21
24
  #include <string_view>
22
25
  #include <type_traits>
23
26
 
@@ -144,7 +147,8 @@ namespace Ice
144
147
  }
145
148
 
146
149
  /// Creates a proxy that is identical to this proxy, except for the invocation timeout.
147
- /// @param timeout The new invocation timeout (in milliseconds).
150
+ /// @param timeout The new invocation timeout (in milliseconds). Zero or any negative value means infinite
151
+ /// and is normalized to -1.
148
152
  /// @return A proxy with the new timeout.
149
153
  [[nodiscard]] Prx ice_invocationTimeout(int timeout) const
150
154
  {
@@ -152,13 +156,27 @@ namespace Ice
152
156
  }
153
157
 
154
158
  /// Creates a proxy that is identical to this proxy, except for the invocation timeout.
155
- /// @param timeout The new invocation timeout.
159
+ /// @param timeout The new invocation timeout. Zero or any negative duration means infinite and is
160
+ /// normalized to -1 millisecond; a duration that is not a whole number of milliseconds is rounded up to the
161
+ /// next whole number of milliseconds.
156
162
  /// @return A proxy with the new timeout.
163
+ /// @throws std::invalid_argument Thrown when @p timeout is greater than
164
+ /// `std::numeric_limits<std::int32_t>::max()` milliseconds.
157
165
  template<class Rep, class Period>
158
166
  [[nodiscard]] Prx ice_invocationTimeout(const std::chrono::duration<Rep, Period>& timeout) const
159
167
  {
160
- return fromReference(
161
- asPrx()._invocationTimeout(std::chrono::duration_cast<std::chrono::milliseconds>(timeout)));
168
+ if (timeout <= std::chrono::duration<Rep, Period>::zero())
169
+ {
170
+ return fromReference(asPrx()._invocationTimeout(std::chrono::milliseconds(-1)));
171
+ }
172
+ // Compare in a double-based representation that cannot overflow. The limit is a whole number of
173
+ // milliseconds, so a timeout that passes this check still fits after rounding up.
174
+ // The extra parentheses prevent the expansion of the max macro from Windows headers.
175
+ if (timeout > std::chrono::duration<double, std::milli>{(std::numeric_limits<std::int32_t>::max)()})
176
+ {
177
+ throw std::invalid_argument("the invocation timeout cannot be greater than 2147483647 milliseconds");
178
+ }
179
+ return fromReference(asPrx()._invocationTimeout(std::chrono::ceil<std::chrono::milliseconds>(timeout)));
162
180
  }
163
181
 
164
182
  /// Creates a proxy that is identical to this proxy, except for the locator.
@@ -170,7 +188,8 @@ namespace Ice
170
188
  }
171
189
 
172
190
  /// Creates a proxy that is identical to this proxy, except for the locator cache timeout.
173
- /// @param timeout The new locator cache timeout (in seconds).
191
+ /// @param timeout The new locator cache timeout (in seconds). Any negative value means infinite and is
192
+ /// normalized to -1.
174
193
  /// @return A proxy with the new timeout.
175
194
  [[nodiscard]] Prx ice_locatorCacheTimeout(int timeout) const
176
195
  {
@@ -178,13 +197,27 @@ namespace Ice
178
197
  }
179
198
 
180
199
  /// Creates a proxy that is identical to this proxy, except for the locator cache timeout.
181
- /// @param timeout The new locator cache timeout.
200
+ /// @param timeout The new locator cache timeout. Any negative duration means infinite and is normalized to
201
+ /// -1 second; a duration that is not a whole number of seconds is rounded up to the next whole number of
202
+ /// seconds.
182
203
  /// @return A proxy with the new timeout.
204
+ /// @throws std::invalid_argument Thrown when @p timeout is greater than
205
+ /// `std::numeric_limits<std::int32_t>::max()` seconds.
183
206
  template<class Rep, class Period>
184
207
  [[nodiscard]] Prx ice_locatorCacheTimeout(const std::chrono::duration<Rep, Period>& timeout) const
185
208
  {
186
- return fromReference(
187
- asPrx()._locatorCacheTimeout(std::chrono::duration_cast<std::chrono::seconds>(timeout)));
209
+ if (timeout < std::chrono::duration<Rep, Period>::zero())
210
+ {
211
+ return fromReference(asPrx()._locatorCacheTimeout(std::chrono::seconds(-1)));
212
+ }
213
+ // Compare in a double-based representation that cannot overflow. The limit is a whole number of
214
+ // seconds, so a timeout that passes this check still fits after rounding up.
215
+ // The extra parentheses prevent the expansion of the max macro from Windows headers.
216
+ if (timeout > std::chrono::duration<double>{(std::numeric_limits<std::int32_t>::max)()})
217
+ {
218
+ throw std::invalid_argument("the locator cache timeout cannot be greater than 2147483647 seconds");
219
+ }
220
+ return fromReference(asPrx()._locatorCacheTimeout(std::chrono::ceil<std::chrono::seconds>(timeout)));
188
221
  }
189
222
 
190
223
  /// Creates a proxy that is identical to this proxy, but uses oneway invocations.
@@ -266,11 +299,19 @@ namespace Ice
266
299
 
267
300
  /// Tests whether this object supports a specific Slice interface.
268
301
  /// @param typeId The type ID of the Slice interface to test against.
269
- /// @param response The response callback. It accepts:
302
+ /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool thread.
303
+ /// If you set InitializationData::executor, the executor determines the thread that executes this function.
304
+ /// It accepts:
270
305
  /// - `true` if the target object implements the Slice interface specified by @p typeId or implements a
271
306
  /// derived interface, `false` otherwise.
272
- /// @param ex The exception callback.
273
- /// @param sent The sent callback.
307
+ /// @param ex The exception callback. The Ice runtime calls this function from an Ice thread pool thread. If
308
+ /// you set InitializationData::executor, the executor determines the thread that executes this function.
309
+ /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
310
+ /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
311
+ /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
312
+ /// this function from an Ice thread pool thread and passes `false` as argument. If you set
313
+ /// InitializationData::executor, the executor determines the thread that executes this function in the
314
+ /// asynchronous case.
274
315
  /// @param context The request context.
275
316
  /// @return A function that can be called to cancel the invocation locally.
276
317
  // NOLINTNEXTLINE(modernize-use-nodiscard)
@@ -299,11 +340,22 @@ namespace Ice
299
340
  void ice_ping(const Ice::Context& context = Ice::noExplicitContext) const;
300
341
 
301
342
  /// Tests whether the target object of this proxy can be reached.
302
- /// @param response The response callback.
303
- /// @param ex The exception callback.
304
- /// @param sent The sent callback.
343
+ /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool thread.
344
+ /// If you set InitializationData::executor, the executor determines the thread that executes this function.
345
+ /// @param ex The exception callback. The Ice runtime calls this function from an Ice thread pool thread. If
346
+ /// you set InitializationData::executor, the executor determines the thread that executes this function.
347
+ /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
348
+ /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
349
+ /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
350
+ /// this function from an Ice thread pool thread and passes `false` as argument. If you set
351
+ /// InitializationData::executor, the executor determines the thread that executes this function in the
352
+ /// asynchronous case.
305
353
  /// @param context The request context.
306
354
  /// @return A function that can be called to cancel the invocation locally.
355
+ /// @remark When this proxy is a oneway or datagram proxy, the Ice runtime does not call the response
356
+ /// callback: a successful invocation completes with the sent callback. When this proxy is a batch proxy, this
357
+ /// function only adds the request to the batch: the Ice runtime calls none of the callbacks, and the request
358
+ /// is sent later, by a flush.
307
359
  // NOLINTNEXTLINE(modernize-use-nodiscard)
308
360
  std::function<void()> ice_pingAsync(
309
361
  std::function<void()> response,
@@ -325,10 +377,18 @@ namespace Ice
325
377
  [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Context& context = Ice::noExplicitContext) const;
326
378
 
327
379
  /// Gets the Slice interfaces supported by this object as a list of Slice type IDs.
328
- /// @param response The response callback. It accepts:
380
+ /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool thread.
381
+ /// If you set InitializationData::executor, the executor determines the thread that executes this function.
382
+ /// It accepts:
329
383
  /// - The Slice type IDs of the interfaces supported by this object, in alphabetical order.
330
- /// @param ex The exception callback.
331
- /// @param sent The sent callback.
384
+ /// @param ex The exception callback. The Ice runtime calls this function from an Ice thread pool thread. If
385
+ /// you set InitializationData::executor, the executor determines the thread that executes this function.
386
+ /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
387
+ /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
388
+ /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
389
+ /// this function from an Ice thread pool thread and passes `false` as argument. If you set
390
+ /// InitializationData::executor, the executor determines the thread that executes this function in the
391
+ /// asynchronous case.
332
392
  /// @param context The request context.
333
393
  /// @return A function that can be called to cancel the invocation locally.
334
394
  // NOLINTNEXTLINE(modernize-use-nodiscard)
@@ -356,10 +416,18 @@ namespace Ice
356
416
  [[nodiscard]] std::string ice_id(const Ice::Context& context = Ice::noExplicitContext) const;
357
417
 
358
418
  /// Gets the type ID of the most-derived Slice interface supported by this object.
359
- /// @param response The response callback. It accepts:
419
+ /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool thread.
420
+ /// If you set InitializationData::executor, the executor determines the thread that executes this function.
421
+ /// It accepts:
360
422
  /// - The type ID of the most-derived interface.
361
- /// @param ex The exception callback.
362
- /// @param sent The sent callback.
423
+ /// @param ex The exception callback. The Ice runtime calls this function from an Ice thread pool thread. If
424
+ /// you set InitializationData::executor, the executor determines the thread that executes this function.
425
+ /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
426
+ /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
427
+ /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
428
+ /// this function from an Ice thread pool thread and passes `false` as argument. If you set
429
+ /// InitializationData::executor, the executor determines the thread that executes this function in the
430
+ /// asynchronous case.
363
431
  /// @param context The request context.
364
432
  /// @return A function that can be called to cancel the invocation locally.
365
433
  // NOLINTNEXTLINE(modernize-use-nodiscard)
@@ -381,10 +449,14 @@ namespace Ice
381
449
  /// Invokes an operation.
382
450
  /// @param operation The name of the operation to invoke.
383
451
  /// @param mode The operation mode (normal or idempotent).
384
- /// @param inParams An encapsulation containing the encoded in-parameters for the operation.
452
+ /// @param inParams An encapsulation containing the encoded in-parameters for the operation. You can pass an
453
+ /// empty byte sequence when the operation takes no in-parameters; the Ice runtime then marshals an empty
454
+ /// encapsulation.
385
455
  /// @param outParams An encapsulation containing the encoded result.
386
456
  /// @param context The request context.
387
457
  /// @return `true` if the operation completed successfully, `false` if it completed with a user exception.
458
+ /// @remark When this proxy is a oneway, datagram, or batch proxy, this function returns `true` and an empty
459
+ /// @p outParams as soon as the request is accepted by the transport or added to the batch.
388
460
  bool ice_invoke(
389
461
  std::string_view operation,
390
462
  Ice::OperationMode mode,
@@ -395,12 +467,16 @@ namespace Ice
395
467
  /// Invokes an operation asynchronously.
396
468
  /// @param operation The name of the operation to invoke.
397
469
  /// @param mode The operation mode (normal or idempotent).
398
- /// @param inParams An encapsulation containing the encoded in-parameters for the operation.
470
+ /// @param inParams An encapsulation containing the encoded in-parameters for the operation. You can pass an
471
+ /// empty byte sequence when the operation takes no in-parameters; the Ice runtime then marshals an empty
472
+ /// encapsulation.
399
473
  /// @param context The request context.
400
474
  /// @return A future that becomes available when the invocation completes. This future holds:
401
475
  /// - `returnValue` `true` if the operation completed successfully, `false` if it completed with a user
402
476
  /// exception.
403
477
  /// - `outParams` An encapsulation containing the encoded result.
478
+ /// @remark When this proxy is a oneway, datagram, or batch proxy, the future completes with `returnValue`
479
+ /// `true` and an empty `outParams` as soon as the request is accepted by the transport or added to the batch.
404
480
  [[nodiscard]] std::future<std::tuple<bool, std::vector<std::byte>>> ice_invokeAsync(
405
481
  std::string_view operation,
406
482
  Ice::OperationMode mode,
@@ -410,15 +486,29 @@ namespace Ice
410
486
  /// Invokes an operation asynchronously.
411
487
  /// @param operation The name of the operation to invoke.
412
488
  /// @param mode The operation mode (normal or idempotent).
413
- /// @param inParams An encapsulation containing the encoded in-parameters for the operation.
414
- /// @param response The response callback. It accepts:
489
+ /// @param inParams An encapsulation containing the encoded in-parameters for the operation. You can pass an
490
+ /// empty byte sequence when the operation takes no in-parameters; the Ice runtime then marshals an empty
491
+ /// encapsulation.
492
+ /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool thread.
493
+ /// If you set InitializationData::executor, the executor determines the thread that executes this function.
494
+ /// It accepts:
415
495
  /// - `returnValue` `true` if the operation completed successfully, `false` if it completed with a user
416
496
  /// exception.
417
497
  /// - `outParams` An encapsulation containing the encoded result.
418
- /// @param ex The exception callback.
419
- /// @param sent The sent callback.
498
+ /// @param ex The exception callback. The Ice runtime calls this function from an Ice thread pool thread. If
499
+ /// you set InitializationData::executor, the executor determines the thread that executes this function.
500
+ /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
501
+ /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
502
+ /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
503
+ /// this function from an Ice thread pool thread and passes `false` as argument. If you set
504
+ /// InitializationData::executor, the executor determines the thread that executes this function in the
505
+ /// asynchronous case.
420
506
  /// @param context The request context.
421
507
  /// @return A function that can be called to cancel the invocation locally.
508
+ /// @remark When this proxy is a oneway or datagram proxy, the Ice runtime does not call the response
509
+ /// callback: a successful invocation completes with the sent callback. When this proxy is a batch proxy, this
510
+ /// function only adds the request to the batch: the Ice runtime calls none of the callbacks, and the request
511
+ /// is sent later, by a flush.
422
512
  // NOLINTNEXTLINE(modernize-use-nodiscard)
423
513
  std::function<void()> ice_invokeAsync(
424
514
  std::string_view operation,
@@ -432,10 +522,14 @@ namespace Ice
432
522
  /// Invokes an operation.
433
523
  /// @param operation The name of the operation to invoke.
434
524
  /// @param mode The operation mode (normal or idempotent).
435
- /// @param inParams An encapsulation containing the encoded in-parameters for the operation.
525
+ /// @param inParams An encapsulation containing the encoded in-parameters for the operation. You can pass an
526
+ /// empty byte sequence when the operation takes no in-parameters; the Ice runtime then marshals an empty
527
+ /// encapsulation.
436
528
  /// @param outParams An encapsulation containing the encoded result.
437
529
  /// @param context The request context.
438
530
  /// @return `true` if the operation completed successfully, `false` if it completed with a user exception.
531
+ /// @remark When this proxy is a oneway, datagram, or batch proxy, this function returns `true` and an empty
532
+ /// @p outParams as soon as the request is accepted by the transport or added to the batch.
439
533
  bool ice_invoke(
440
534
  std::string_view operation,
441
535
  Ice::OperationMode mode,
@@ -446,12 +540,16 @@ namespace Ice
446
540
  /// Invokes an operation asynchronously.
447
541
  /// @param operation The name of the operation to invoke.
448
542
  /// @param mode The operation mode (normal or idempotent).
449
- /// @param inParams An encapsulation containing the encoded in-parameters for the operation.
543
+ /// @param inParams An encapsulation containing the encoded in-parameters for the operation. You can pass an
544
+ /// empty byte sequence when the operation takes no in-parameters; the Ice runtime then marshals an empty
545
+ /// encapsulation.
450
546
  /// @param context The request context.
451
547
  /// @return A future that becomes available when the invocation completes. This future holds:
452
548
  /// - `returnValue` `true` if the operation completed successfully, `false` if it completed with a user
453
549
  /// exception.
454
550
  /// - `outParams` An encapsulation containing the encoded result.
551
+ /// @remark When this proxy is a oneway, datagram, or batch proxy, the future completes with `returnValue`
552
+ /// `true` and an empty `outParams` as soon as the request is accepted by the transport or added to the batch.
455
553
  [[nodiscard]] std::future<std::tuple<bool, std::vector<std::byte>>> ice_invokeAsync(
456
554
  std::string_view operation,
457
555
  Ice::OperationMode mode,
@@ -461,15 +559,29 @@ namespace Ice
461
559
  /// Invokes an operation asynchronously.
462
560
  /// @param operation The name of the operation to invoke.
463
561
  /// @param mode The operation mode (normal or idempotent).
464
- /// @param inParams An encapsulation containing the encoded in-parameters for the operation.
465
- /// @param response The response callback. It accepts:
562
+ /// @param inParams An encapsulation containing the encoded in-parameters for the operation. You can pass an
563
+ /// empty byte sequence when the operation takes no in-parameters; the Ice runtime then marshals an empty
564
+ /// encapsulation.
565
+ /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool thread.
566
+ /// If you set InitializationData::executor, the executor determines the thread that executes this function.
567
+ /// It accepts:
466
568
  /// - `returnValue` `true` if the operation completed successfully, `false` if it completed with a user
467
569
  /// exception.
468
570
  /// - `outParams` An encapsulation containing the encoded result.
469
- /// @param ex The exception callback.
470
- /// @param sent The sent callback.
571
+ /// @param ex The exception callback. The Ice runtime calls this function from an Ice thread pool thread. If
572
+ /// you set InitializationData::executor, the executor determines the thread that executes this function.
573
+ /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
574
+ /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
575
+ /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
576
+ /// this function from an Ice thread pool thread and passes `false` as argument. If you set
577
+ /// InitializationData::executor, the executor determines the thread that executes this function in the
578
+ /// asynchronous case.
471
579
  /// @param context The request context.
472
580
  /// @return A function that can be called to cancel the invocation locally.
581
+ /// @remark When this proxy is a oneway or datagram proxy, the Ice runtime does not call the response
582
+ /// callback: a successful invocation completes with the sent callback. When this proxy is a batch proxy, this
583
+ /// function only adds the request to the batch: the Ice runtime calls none of the callbacks, and the request
584
+ /// is sent later, by a flush.
473
585
  // NOLINTNEXTLINE(modernize-use-nodiscard)
474
586
  std::function<void()> ice_invokeAsync(
475
587
  std::string_view operation,
@@ -480,47 +592,76 @@ namespace Ice
480
592
  std::function<void(bool)> sent = nullptr,
481
593
  const Ice::Context& context = Ice::noExplicitContext) const;
482
594
 
483
- /// Gets the connection for this proxy. If the proxy does not yet have an established connection,
484
- /// it first attempts to create a connection.
595
+ /// Gets the connection for this proxy. If the proxy does not yet have an established connection or its
596
+ /// connection is closed or being closed, it first attempts to create a new connection. For a fixed proxy,
597
+ /// this function returns the connection this proxy is bound to, even when this connection is closed.
485
598
  /// @return The connection for this proxy.
486
599
  /// @remark You can call this function to establish a connection or associate the proxy with an existing
487
600
  /// connection and ignore the return value.
601
+ /// @remark When this proxy reaches its target object through collocation optimization (see
602
+ /// #ice_collocationOptimized), this function returns a null connection: collocated invocations don't use a
603
+ /// connection.
488
604
  Ice::ConnectionPtr ice_getConnection() const; // NOLINT(modernize-use-nodiscard)
489
605
 
490
- /// Gets the connection for this proxy. If the proxy does not yet have an established connection,
491
- /// it first attempts to create a connection.
492
- /// @param response The response callback. It accepts:
606
+ /// Gets the connection for this proxy. If the proxy does not yet have an established connection or its
607
+ /// connection is closed or being closed, it first attempts to create a new connection. For a fixed proxy,
608
+ /// this function returns the connection this proxy is bound to, even when this connection is closed.
609
+ /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool thread.
610
+ /// If you set InitializationData::executor, the executor determines the thread that executes this function.
611
+ /// It accepts:
493
612
  /// - The connection for this proxy.
494
- /// @param ex The exception callback.
495
- /// @param sent The sent callback.
613
+ /// @param ex The exception callback. The Ice runtime calls this function from an Ice thread pool thread. If
614
+ /// you set InitializationData::executor, the executor determines the thread that executes this function.
615
+ /// @param sent The sent callback. The Ice runtime never calls this function: no request is sent to get a
616
+ /// connection.
496
617
  /// @return A function that can be called to cancel the invocation locally.
618
+ /// @remark When this proxy reaches its target object through collocation optimization (see
619
+ /// #ice_collocationOptimized), the response callback receives a null connection: collocated invocations don't
620
+ /// use a connection.
497
621
  // NOLINTNEXTLINE(modernize-use-nodiscard)
498
622
  std::function<void()> ice_getConnectionAsync(
499
623
  std::function<void(Ice::ConnectionPtr)> response,
500
624
  std::function<void(std::exception_ptr)> ex = nullptr,
501
625
  std::function<void(bool)> sent = nullptr) const;
502
626
 
503
- /// Gets the connection for this proxy. If the proxy does not yet have an established connection,
504
- /// it first attempts to create a connection.
505
- /// @return A future that becomes available when the invocation completes. This future holds:
627
+ /// Gets the connection for this proxy. If the proxy does not yet have an established connection or its
628
+ /// connection is closed or being closed, it first attempts to create a new connection. For a fixed proxy,
629
+ /// this function returns the connection this proxy is bound to, even when this connection is closed.
630
+ /// @return A future that becomes available when the connection is established. This future holds:
506
631
  /// - The connection for this proxy.
632
+ /// @remark When this proxy reaches its target object through collocation optimization (see
633
+ /// #ice_collocationOptimized), the future holds a null connection: collocated invocations don't use a
634
+ /// connection.
507
635
  [[nodiscard]] std::future<Ice::ConnectionPtr> ice_getConnectionAsync() const;
508
636
 
509
637
  /// @private
510
638
  void _iceI_getConnection(const std::shared_ptr<IceInternal::ProxyGetConnection>&) const;
511
639
 
512
- /// Gets the cached Connection for this proxy. If the proxy does not yet have an established connection, it does
513
- /// not attempt to create a connection.
514
- /// @return The cached connection for this proxy, or nullptr if the proxy does not have an established
515
- /// connection.
640
+ /// Gets the Connection cached by this proxy. Once this proxy has been associated with a connection
641
+ /// (typically during its first invocation), it caches this connection and continues using it for subsequent
642
+ /// invocations, until an invocation on this proxy fails. This function never attempts to establish a
643
+ /// connection. For a fixed proxy, this function returns the connection this proxy is bound to, even when
644
+ /// this connection is closed.
645
+ /// @return The cached connection, or nullptr if this proxy doesn't have a cached connection. The returned
646
+ /// connection can be closed.
647
+ /// @remark A proxy with connection caching disabled (see #ice_connectionCached) never caches a connection: for
648
+ /// such a proxy, this function always returns nullptr. This function also returns nullptr when this proxy
649
+ /// reaches its target object through collocation optimization (see #ice_collocationOptimized): collocated
650
+ /// invocations don't use a connection.
516
651
  [[nodiscard]] Ice::ConnectionPtr ice_getCachedConnection() const noexcept;
517
652
 
518
653
  /// Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.
519
654
  void ice_flushBatchRequests() const;
520
655
 
521
656
  /// Flushes any pending batched requests for this proxy asynchronously.
522
- /// @param ex The exception callback.
523
- /// @param sent The sent callback.
657
+ /// @param ex The exception callback. The Ice runtime calls this function from an Ice thread pool thread. If
658
+ /// you set InitializationData::executor, the executor determines the thread that executes this function.
659
+ /// @param sent The sent callback. The Ice runtime calls this function when the batch requests are accepted
660
+ /// by the transport. When the batch requests are accepted synchronously, the Ice runtime calls this function
661
+ /// from the current thread and passes `true` as argument. When the batch requests are accepted asynchronously,
662
+ /// the Ice runtime calls this function from an Ice thread pool thread and passes `false` as argument. If you
663
+ /// set InitializationData::executor, the executor determines the thread that executes this function in the
664
+ /// asynchronous case.
524
665
  /// @return A function that can be called to cancel the invocation locally.
525
666
  // NOLINTNEXTLINE(modernize-use-nodiscard)
526
667
  std::function<void()> ice_flushBatchRequestsAsync(
@@ -594,8 +735,9 @@ namespace Ice
594
735
  /// @return The locator for this proxy. If no locator is configured, the return value is nullopt.
595
736
  [[nodiscard]] std::optional<LocatorPrx> ice_getLocator() const noexcept;
596
737
 
597
- /// Determines whether this proxy uses collocation optimization.
598
- /// @return `true` if the proxy uses collocation optimization, `false` otherwise.
738
+ /// Determines whether this proxy has collocation optimization enabled.
739
+ /// @return `true` if this proxy has collocation optimization enabled, `false` otherwise.
740
+ /// @see #ice_collocationOptimized
599
741
  [[nodiscard]] bool ice_isCollocationOptimized() const noexcept;
600
742
 
601
743
  /// Gets the invocation timeout of this proxy.
@@ -43,8 +43,8 @@ namespace Ice::SSL
43
43
  /// @param host The target host name.
44
44
  /// @return The client SSL credentials.
45
45
  ///
46
- /// Example of setting `clientCertificateSelectionCallback`:
47
- /// @snippet Ice/SSL/SchannelClientAuthenticationOptions.cpp clientCertificateSelectionCallback
46
+ /// Example of setting `clientCredentialsSelectionCallback`:
47
+ /// @snippet Ice/SSL/SchannelClientAuthenticationOptions.cpp clientCredentialsSelectionCallback
48
48
  ///
49
49
  /// @see [SCH_CREDENTIALS]
50
50
  /// @see [AcquireCredentialsHandle]
@@ -150,7 +150,7 @@ namespace Ice::SSL
150
150
  /// [SecTrustSetAnchorCertificatesOnly] with the `anchorCertificatesOnly` parameter set to true.
151
151
  ///
152
152
  /// Example of setting `trustedRootCertificates`:
153
- /// @snippet Ice/SSL/SecureTransportServerAuthenticationOptions.cpp trustedRootCertificates
153
+ /// @snippet Ice/SSL/SecureTransportClientAuthenticationOptions.cpp trustedRootCertificates
154
154
  ///
155
155
  /// [SecTrustSetAnchorCertificates]:
156
156
  /// https://developer.apple.com/documentation/security/1396098-sectrustsetanchorcertificates?language=objc
@@ -15,7 +15,7 @@
15
15
 
16
16
  namespace Ice::SSL
17
17
  {
18
- /// Provides access to an SSL endpoint information.
18
+ /// Provides access to an SSL endpoint's information.
19
19
  class ICE_API EndpointInfo final : public Ice::EndpointInfo
20
20
  {
21
21
  public: