summaryrefslogtreecommitdiff
path: root/cppe
diff options
context:
space:
mode:
Diffstat (limited to 'cppe')
-rw-r--r--cppe/include/IceE/Config.h15
-rwxr-xr-xcppe/include/IceE/Connection.h2
-rwxr-xr-xcppe/src/IceE/Connection.cpp32
3 files changed, 8 insertions, 41 deletions
diff --git a/cppe/include/IceE/Config.h b/cppe/include/IceE/Config.h
index 8302122057c..fa345521f6c 100644
--- a/cppe/include/IceE/Config.h
+++ b/cppe/include/IceE/Config.h
@@ -27,16 +27,10 @@
#define ICEE_HAS_BATCH
//
-// Comment this out if you want to build without support for blocking
-// client.
-//
-//#define ICEE_BLOCKING_CLIENT
-
-//
// Comment this line if you don't want the pure client library built
// with only blocking support.
//
-//#define ICEE_PURE_BLOCKING_CLIENT
+#define ICEE_PURE_BLOCKING_CLIENT
// ***********************************************************************
//
@@ -60,13 +54,6 @@
#endif
//
-// If pure blocking client is defined, blocking client must be as well.
-//
-#if defined(ICEE_PURE_BLOCKING_CLIENT) && !defined(ICEE_BLOCKING_CLIENT)
-# define ICEE_BLOCKING_CLIENT
-#endif
-
-//
// On Windows CE, socket timeouts (SO_SNDTIMEO and SO_RCVTIMEO) are
// not supported so we use select()/WSAEventSelect to implement
// timeouts.
diff --git a/cppe/include/IceE/Connection.h b/cppe/include/IceE/Connection.h
index 8cececf7429..0e59605ba00 100755
--- a/cppe/include/IceE/Connection.h
+++ b/cppe/include/IceE/Connection.h
@@ -190,7 +190,7 @@ private:
int _batchRequestNum;
#endif
-#if defined(ICEE_BLOCKING_CLIENT) && !defined(ICEE_PURE_BLOCKING_CLIENT)
+#if !defined(ICEE_PURE_BLOCKING_CLIENT)
bool _blocking;
#endif
diff --git a/cppe/src/IceE/Connection.cpp b/cppe/src/IceE/Connection.cpp
index fd34a1308eb..8f400bef972 100755
--- a/cppe/src/IceE/Connection.cpp
+++ b/cppe/src/IceE/Connection.cpp
@@ -343,15 +343,11 @@ Ice::Connection::sendRequest(BasicStream* os, Outgoing* out)
#endif
#ifndef ICEE_PURE_BLOCKING_CLIENT
-#ifdef ICEE_BLOCKING_CLIENT
if(!_blocking)
{
-#endif
_requestsHint = _requests.insert(_requests.end(), pair<const Int, Outgoing*>(requestId, out));
-#ifdef ICEE_BLOCKING_CLIENT
}
#endif
-#endif
}
const Int sz = static_cast<Int>(os->b.size());
@@ -386,7 +382,6 @@ Ice::Connection::sendRequest(BasicStream* os, Outgoing* out)
return;
}
-#ifdef ICEE_BLOCKING_CLIENT
#ifndef ICEE_PURE_BLOCKING_CLIENT
if(_blocking)
{
@@ -420,9 +415,6 @@ Ice::Connection::sendRequest(BasicStream* os, Outgoing* out)
}
else
{
-#endif
-#endif
-#ifndef ICEE_PURE_BLOCKING_CLIENT
//
// Wait until the request has completed, or until the request times out.
//
@@ -470,8 +462,6 @@ Ice::Connection::sendRequest(BasicStream* os, Outgoing* out)
_sendMonitor.wait();
}
}
-#endif
-#if defined(ICEE_BLOCKING_CLIENT) && !defined(ICEE_PURE_BLOCKING_CLIENT)
}
#endif
}
@@ -925,7 +915,7 @@ Ice::Connection::Connection(const InstancePtr& instance,
, _requestsHint(_requests.end())
#endif
{
-#if defined(ICEE_BLOCKING_CLIENT) && !defined(ICEE_PURE_BLOCKING_CLIENT)
+#ifndef ICEE_PURE_BLOCKING_CLIENT
# ifdef ICEE_PURE_CLIENT
_blocking = _instance->properties()->getPropertyAsInt("Ice.Blocking") > 0;
# else
@@ -939,10 +929,8 @@ Ice::Connection::Connection(const InstancePtr& instance,
{
_transceiver->setTimeouts(-1, _endpoint->timeout());
}
-#elif defined(ICEE_BLOCKING_CLIENT) && defined(ICEE_PURE_BLOCKING_CLIENT)
- _transceiver->setTimeouts(_endpoint->timeout(), _endpoint->timeout());
#else
- _transceiver->setTimeouts(-1, _endpoint->timeout());
+ _transceiver->setTimeouts(_endpoint->timeout(), _endpoint->timeout());
#endif
vector<Byte>& requestHdr = const_cast<vector<Byte>&>(_requestHdr);
@@ -989,13 +977,11 @@ Ice::Connection::Connection(const InstancePtr& instance,
#ifdef ICEE_PURE_BLOCKING_CLIENT
validate();
#else
-# ifdef ICEE_BLOCKING_CLIENT
if(_blocking)
{
validate();
}
else
-# endif
{
__setNoDelete(true);
try
@@ -1334,11 +1320,10 @@ Ice::Connection::setState(State state)
//
// In blocking mode, we close the transceiver now.
//
-#ifdef ICEE_BLOCKING_CLIENT
-# ifndef ICEE_PURE_BLOCKING_CLIENT
+#ifndef ICEE_PURE_BLOCKING_CLIENT
if(_blocking)
+#endif
{
-# endif
Lock sync(_sendMonitor);
try
{
@@ -1348,10 +1333,7 @@ Ice::Connection::setState(State state)
{
}
_transceiver = 0;
-# ifndef ICEE_PURE_BLOCKING_CLIENT
}
-# endif
-#endif
break;
}
}
@@ -1367,14 +1349,12 @@ Ice::Connection::setState(State state)
{
initiateShutdown();
-#ifdef ICEE_BLOCKING_CLIENT
-# ifndef ICEE_PURE_BLOCKING_CLIENT
+#ifndef ICEE_PURE_BLOCKING_CLIENT
if(_blocking)
-# endif
+#endif
{
setState(StateClosed);
}
-#endif
}
catch(const LocalException& ex)
{