summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ConnectionI.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-02-27 17:38:59 +0100
committerBenoit Foucher <benoit@zeroc.com>2013-02-27 17:38:59 +0100
commit5693628a2dec254458a007d07f7ef9519cf0e554 (patch)
treeef973d6c8e336024c323cbcf5d96cda217b93051 /cpp/src/Ice/ConnectionI.h
parentFixed (ICE-5248) - opening VS2010 demo solution takes a long time (diff)
downloadice-5693628a2dec254458a007d07f7ef9519cf0e554.tar.bz2
ice-5693628a2dec254458a007d07f7ef9519cf0e554.tar.xz
ice-5693628a2dec254458a007d07f7ef9519cf0e554.zip
Fixed ICE-5275 - AMI race condition
Diffstat (limited to 'cpp/src/Ice/ConnectionI.h')
-rw-r--r--cpp/src/Ice/ConnectionI.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/cpp/src/Ice/ConnectionI.h b/cpp/src/Ice/ConnectionI.h
index bf60d039ef1..21d692d7536 100644
--- a/cpp/src/Ice/ConnectionI.h
+++ b/cpp/src/Ice/ConnectionI.h
@@ -94,6 +94,26 @@ public:
};
typedef IceUtil::Handle<StartCallback> StartCallbackPtr;
+ struct SentCallback
+ {
+#if defined(ICE_USE_IOCP) || defined(ICE_OS_WINRT)
+ SentCallback(const IceInternal::OutgoingAsyncMessageCallbackPtr& outAsync,
+ const IceInternal::OutgoingAsyncPtr& replyOutAsync) :
+ outAsync(outAsync), replyOutAsync(replyOutAsync)
+ {
+ }
+#else
+ SentCallback(const IceInternal::OutgoingAsyncMessageCallbackPtr& outAsync) : outAsync(outAsync)
+ {
+ }
+#endif
+
+ IceInternal::OutgoingAsyncMessageCallbackPtr outAsync;
+#if defined(ICE_USE_IOCP) || defined(ICE_OS_WINRT)
+ IceInternal::OutgoingAsyncPtr replyOutAsync;
+#endif
+ };
+
enum DestructionReason
{
ObjectAdapterDeactivated,
@@ -178,9 +198,9 @@ public:
void exception(const LocalException&);
void invokeException(const LocalException&, int);
- void dispatch(const StartCallbackPtr&, const std::vector<IceInternal::OutgoingAsyncMessageCallbackPtr>&,
- Byte, Int, Int, const IceInternal::ServantManagerPtr&, const ObjectAdapterPtr&,
- const IceInternal::OutgoingAsyncPtr&, IceInternal::BasicStream&);
+ void dispatch(const StartCallbackPtr&, const std::vector<SentCallback>&, Byte, Int, Int,
+ const IceInternal::ServantManagerPtr&, const ObjectAdapterPtr&, const IceInternal::OutgoingAsyncPtr&,
+ IceInternal::BasicStream&);
void finish();
private:
@@ -223,6 +243,9 @@ private:
IceInternal::BasicStream* stream;
IceInternal::OutgoingMessageCallback* out;
IceInternal::OutgoingAsyncMessageCallbackPtr outAsync;
+#if defined(ICE_USE_IOCP) || defined(ICE_OS_WINRT)
+ IceInternal::OutgoingAsyncPtr replyOutAsync;
+#endif
bool compress;
int requestId;
bool adopted;
@@ -244,7 +267,7 @@ private:
bool initialize(IceInternal::SocketOperation = IceInternal::SocketOperationNone);
bool validate(IceInternal::SocketOperation = IceInternal::SocketOperationNone);
- void sendNextMessage(std::vector<IceInternal::OutgoingAsyncMessageCallbackPtr>&);
+ void sendNextMessage(std::vector<SentCallback>&);
IceInternal::AsyncStatus sendMessage(OutgoingMessage&);
#ifndef ICE_OS_WINRT