diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 20:29:55 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 20:29:55 +0000 |
commit | 0f58817c50c73ac0acc9a924e4cf042c52c30335 (patch) | |
tree | a57e68756165286017c24baab566861b15f5c540 /remoting/protocol | |
parent | 1fb08ac089b0f6f5e92108e287d1ed061de525fe (diff) | |
download | chromium_src-0f58817c50c73ac0acc9a924e4cf042c52c30335.zip chromium_src-0f58817c50c73ac0acc9a924e4cf042c52c30335.tar.gz chromium_src-0f58817c50c73ac0acc9a924e4cf042c52c30335.tar.bz2 |
Disable TCP connections for chromoting
Chromoting always runs PseudoTcp on top of jingle connections. Sometimes this
jingle connection is a TCP connection and it destroys performance completely.
Until we can bypass PseudoTcp when TCP connection is established and understand
the connection establishing algorithm we only UDP for now, which is known to
work best.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7344002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r-- | remoting/protocol/jingle_session_manager.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc index 92210f2..9c56592 100644 --- a/remoting/protocol/jingle_session_manager.cc +++ b/remoting/protocol/jingle_session_manager.cc @@ -86,6 +86,11 @@ void JingleSessionManager::Init( talk_base::Thread::Current())); } + // We always use PseudoTcp to provide a reliable channel. However + // when it is used together with TCP the performance is very bad + // so we explicitly disables TCP connections. + int port_allocator_flags = cricket::PORTALLOCATOR_DISABLE_TCP; + if (enable_nat_traversing_) { http_port_allocator_ = new remoting::HttpPortAllocator( network_manager_.get(), socket_factory_.get(), @@ -100,13 +105,14 @@ void JingleSessionManager::Init( task_factory_.NewRunnableMethod( &JingleSessionManager::DoStartSessionManager)); } else { + port_allocator_flags |= cricket::PORTALLOCATOR_DISABLE_STUN | + cricket::PORTALLOCATOR_DISABLE_RELAY; port_allocator_.reset( new cricket::BasicPortAllocator( network_manager_.get(), socket_factory_.get())); - port_allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_STUN | - cricket::PORTALLOCATOR_DISABLE_RELAY); DoStartSessionManager(); } + port_allocator_->set_flags(port_allocator_flags); } void JingleSessionManager::Close() { |