summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2003-03-23 01:06:21 +0000
committerMarc Laukien <marc@zeroc.com>2003-03-23 01:06:21 +0000
commit1d083a7d45f66f08e07f31e214333ed0509a7160 (patch)
treee2cba5cfbefc807b54a70ef485869b6c1b5c9d42 /cpp/src
parentincoming fix (diff)
downloadice-1d083a7d45f66f08e07f31e214333ed0509a7160.tar.bz2
ice-1d083a7d45f66f08e07f31e214333ed0509a7160.tar.xz
ice-1d083a7d45f66f08e07f31e214333ed0509a7160.zip
fix
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Network.cpp16
-rw-r--r--cpp/src/Ice/Network.h1
-rw-r--r--cpp/src/Ice/ReferenceFactory.cpp8
3 files changed, 23 insertions, 2 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 7ba4106cc2a..73c14933493 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -331,6 +331,18 @@ IceInternal::setSendBufferSize(SOCKET fd, int sz)
}
void
+IceInternal::setRecvBufferSize(SOCKET fd, int sz)
+{
+ if(setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char*)&sz, sizeof(int)) == SOCKET_ERROR)
+ {
+ closeSocket(fd);
+ SocketException ex(__FILE__, __LINE__);
+ ex.error = getSocketErrno();
+ throw ex;
+ }
+}
+
+void
IceInternal::doBind(SOCKET fd, struct sockaddr_in& addr)
{
#ifndef _WIN32
@@ -385,7 +397,7 @@ IceInternal::doConnect(SOCKET fd, struct sockaddr_in& addr, int timeout)
#ifdef _WIN32
//
// Set larger send buffer size to avoid performance problems on
- // WIN32
+ // WIN32.
//
setSendBufferSize(fd, 64 * 1024);
#endif
@@ -573,7 +585,7 @@ repeatAccept:
#ifdef _WIN32
//
// Set larger send buffer size to avoid performance problems on
- // WIN32
+ // WIN32.
//
setSendBufferSize(ret, 64 * 1024);
#endif
diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h
index b55ae14e09a..ddd12a6b8a1 100644
--- a/cpp/src/Ice/Network.h
+++ b/cpp/src/Ice/Network.h
@@ -79,6 +79,7 @@ ICE_PROTOCOL_API void setBlock(SOCKET, bool);
ICE_PROTOCOL_API void setTcpNoDelay(SOCKET);
ICE_PROTOCOL_API void setKeepAlive(SOCKET);
ICE_PROTOCOL_API void setSendBufferSize(SOCKET, int);
+ICE_PROTOCOL_API void setRecvBufferSize(SOCKET, int);
ICE_PROTOCOL_API void doBind(SOCKET, struct sockaddr_in&);
ICE_PROTOCOL_API void doListen(SOCKET, int);
diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp
index 476623ac06f..fb3264f98e8 100644
--- a/cpp/src/Ice/ReferenceFactory.cpp
+++ b/cpp/src/Ice/ReferenceFactory.cpp
@@ -60,6 +60,13 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
ReferencePtr ref = new Reference(_instance, ident, facet, mode, secure, adapterId,
endpoints, routerInfo, locatorInfo, reverseAdapter, collocationOptimization);
+
+//
+// This code is currently not used, because the eviction code below is
+// too slow when there are a large number of references. The savings
+// are also rather questionable.
+//
+/*
//
// If we already have an equivalent reference, use such equivalent
// reference. Otherwise add the new reference to the reference
@@ -110,6 +117,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
}
}
}
+*/
return ref;
}