Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1810)

Side by Side Diff: webrtc/base/virtualsocketserver.h

Issue 1914803002: Allow the localhost IP address even if it does not match the tcp port address (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: minor fix Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/base/virtualsocketserver.cc » ('j') | webrtc/p2p/base/tcpport.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool ProcessMessagesUntilIdle(); 114 bool ProcessMessagesUntilIdle();
115 115
116 // Sets the next port number to use for testing. 116 // Sets the next port number to use for testing.
117 void SetNextPortForTesting(uint16_t port); 117 void SetNextPortForTesting(uint16_t port);
118 118
119 // Close a pair of Tcp connections by addresses. Both connections will have 119 // Close a pair of Tcp connections by addresses. Both connections will have
120 // its own OnClose invoked. 120 // its own OnClose invoked.
121 bool CloseTcpConnections(const SocketAddress& addr_local, 121 bool CloseTcpConnections(const SocketAddress& addr_local,
122 const SocketAddress& addr_remote); 122 const SocketAddress& addr_remote);
123 123
124 // For testing purpose only. Fired when a client socket is created.
125 sigslot::signal1<VirtualSocket*> SignalSocketCreated;
126
124 protected: 127 protected:
125 // Returns a new IP not used before in this network. 128 // Returns a new IP not used before in this network.
126 IPAddress GetNextIP(int family); 129 IPAddress GetNextIP(int family);
127 uint16_t GetNextPort(); 130 uint16_t GetNextPort();
128 131
129 VirtualSocket* CreateSocketInternal(int family, int type); 132 VirtualSocket* CreateSocketInternal(int family, int type);
130 133
131 // Binds the given socket to addr, assigning and IP and Port if necessary 134 // Binds the given socket to addr, assigning and IP and Port if necessary
132 int Bind(VirtualSocket* socket, SocketAddress* addr); 135 int Bind(VirtualSocket* socket, SocketAddress* addr);
133 136
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 351
349 // Store the options that are set 352 // Store the options that are set
350 OptionsMap options_map_; 353 OptionsMap options_map_;
351 354
352 friend class VirtualSocketServer; 355 friend class VirtualSocketServer;
353 }; 356 };
354 357
355 } // namespace rtc 358 } // namespace rtc
356 359
357 #endif // WEBRTC_BASE_VIRTUALSOCKETSERVER_H_ 360 #endif // WEBRTC_BASE_VIRTUALSOCKETSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/base/virtualsocketserver.cc » ('j') | webrtc/p2p/base/tcpport.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698