Workaround for issue 3927 to allow localhost IP even if it doesn't match the local turn port

BUG=3927
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/28329004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7941 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
guoweis@webrtc.org
2014-12-18 04:45:05 +00:00
parent 4cb3856a4d
commit 4fba293c87
4 changed files with 73 additions and 7 deletions

View File

@ -246,6 +246,11 @@ class VirtualSocket : public AsyncSocket, public MessageHandler {
// Used by server sockets to set the local address without binding.
void SetLocalAddress(const SocketAddress& addr);
// Used by TurnPortTest to mimic a case where proxy returns local host address
// instead of the original one TurnPort was bound against. Please see WebRTC
// issue 3927 for more detail.
void SetAlternativeLocalAddress(const SocketAddress& addr);
virtual int Bind(const SocketAddress& addr);
virtual int Connect(const SocketAddress& addr);
virtual int Close();