Skip to content

Commit

Permalink
DisplayDriverServer : Create IPv6 endpoint
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
johnhaddon committed Feb 12, 2024
1 parent e644618 commit c357ea1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -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)
========

Expand All @@ -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)
========

Expand Down
3 changes: 2 additions & 1 deletion src/IECoreImage/DisplayDriverServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand All @@ -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();
}
Expand Down

0 comments on commit c357ea1

Please sign in to comment.