You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/04/19 00:46:04 UTC
svn commit: r530189 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/SocketFactory.cpp
Author: tabish
Date: Wed Apr 18 15:46:04 2007
New Revision: 530189
URL: http://svn.apache.org/viewvc?view=rev&rev=530189
Log:
http://issues.apache.org/activemq/browse/AMQCPP-101
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/SocketFactory.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/SocketFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/SocketFactory.cpp?view=diff&rev=530189&r1=530188&r2=530189
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/SocketFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/SocketFactory.cpp Wed Apr 18 15:46:04 2007
@@ -88,14 +88,16 @@
dummy = properties.getProperty( "soSendBufferSize", "-1" );
sscanf( dummy.c_str(), "%d", &soSendBufferSize );
+ // Get the socket TCP_NODELAY flag.
+ bool tcpNoDelay =
+ properties.getProperty( "tcpNoDelay", "false" ) == "true";
+
// Now that we have all the elements that we wanted - let's do it!
// Create a TCP Socket and then Wrap it in a buffered socket
// so that users get the benefit of buffered reads and writes.
// The buffered socket will own the TcpSocket instance, and will
// clean it up when it is cleaned up.
TcpSocket* tcpSocket = new TcpSocket();
- /*BufferedSocket* bufferedSocket =
- new BufferedSocket(tcpSocket, inputBufferSize, outputBufferSize);*/
try
{
@@ -105,6 +107,7 @@
// Set the socket options.
tcpSocket->setSoLinger( soLinger );
tcpSocket->setKeepAlive( soKeepAlive );
+ tcpSocket->setTcpNoDelay( tcpNoDelay );
if( soReceiveBufferSize > 0 ){
tcpSocket->setReceiveBufferSize( soReceiveBufferSize );
@@ -113,6 +116,7 @@
if( soSendBufferSize > 0 ){
tcpSocket->setSendBufferSize( soSendBufferSize );
}
+
}
catch ( SocketException& ex )
{