summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/OutgoingAsync.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2003-01-17 03:58:50 +0000
committerMarc Laukien <marc@zeroc.com>2003-01-17 03:58:50 +0000
commit8880977a608f0b735504f18a624de026cde62da7 (patch)
treea8fe5b082caf761337a165e1350a5f65f57bc95d /cpp/src/Ice/OutgoingAsync.cpp
parentfixed a bug with findObjectAdapter (diff)
downloadice-8880977a608f0b735504f18a624de026cde62da7.tar.bz2
ice-8880977a608f0b735504f18a624de026cde62da7.tar.xz
ice-8880977a608f0b735504f18a624de026cde62da7.zip
ConnectionMonitor
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index dca96e8346e..601770612d1 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -81,6 +81,10 @@ void
IceInternal::OutgoingAsync::__invoke()
{
_connection->sendAsyncRequest(this, _compress);
+ if(_connection->timeout() >= 0)
+ {
+ _absoluteTimeout = IceUtil::Time::now() + IceUtil::Time::milliSeconds(_connection->timeout());
+ }
}
void
@@ -214,6 +218,19 @@ IceInternal::OutgoingAsync::__finished(const LocalException& exc)
}
}
+bool
+IceInternal::OutgoingAsync::__timedOut() const
+{
+ if(_connection->timeout() >= 0)
+ {
+ return IceUtil::Time::now() >= _absoluteTimeout;
+ }
+ else
+ {
+ return false;
+ }
+}
+
BasicStream*
IceInternal::OutgoingAsync::__is()
{