From c357ea106daea2ee5aad6bb4f871ddb87e80991e Mon Sep 17 00:00:00 2001 From: John Haddon Date: Tue, 14 Nov 2023 18:12:14 +0000 Subject: [PATCH] DisplayDriverServer : Create IPv6 endpoint This avoids delays on Windows, where the ClientDisplayDriver was first trying a V6 connection and then only making a V4 connection if that failed (after a timeout). --- Changes | 7 ++++++- src/IECoreImage/DisplayDriverServer.cpp | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 96f1c17f41..5fbfdb43b4 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,12 @@ 10.5.x.x (relative to 10.5.6.0) ======== + +Improvements +------------ + +- DisplayDriverServer : Fixed delays connecting to the server on Windows. + 10.5.6.0 (relative to 10.5.5.0) ======== @@ -11,7 +17,6 @@ Improvements - `IECoreGL::ColorTexture`: Added new constructor that accepts an argument specifying the internal storage format to use. - 10.5.5.0 (relative to 10.5.4.2) ======== diff --git a/src/IECoreImage/DisplayDriverServer.cpp b/src/IECoreImage/DisplayDriverServer.cpp index ff093cd5c2..c337225b76 100644 --- a/src/IECoreImage/DisplayDriverServer.cpp +++ b/src/IECoreImage/DisplayDriverServer.cpp @@ -175,7 +175,7 @@ class DisplayDriverServer::PrivateData : public RefCounted void openPort( DisplayDriverServer::Port portNumber ) { - m_endpoint = boost::asio::ip::tcp::endpoint( tcp::v4(), portNumber ); + m_endpoint = boost::asio::ip::tcp::endpoint( tcp::v6(), portNumber ); m_acceptor.open( m_endpoint.protocol() ); #ifdef _MSC_VER m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) ); @@ -184,6 +184,7 @@ class DisplayDriverServer::PrivateData : public RefCounted #else m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( true ) ); #endif + m_acceptor.set_option( boost::asio::ip::v6_only( false ) ); m_acceptor.bind( m_endpoint ); m_acceptor.listen(); }