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

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: Merge with head Created 4 years, 7 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') | no next file with comments »
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bool ProcessMessagesUntilIdle(); 115 bool ProcessMessagesUntilIdle();
116 116
117 // Sets the next port number to use for testing. 117 // Sets the next port number to use for testing.
118 void SetNextPortForTesting(uint16_t port); 118 void SetNextPortForTesting(uint16_t port);
119 119
120 // Close a pair of Tcp connections by addresses. Both connections will have 120 // Close a pair of Tcp connections by addresses. Both connections will have
121 // its own OnClose invoked. 121 // its own OnClose invoked.
122 bool CloseTcpConnections(const SocketAddress& addr_local, 122 bool CloseTcpConnections(const SocketAddress& addr_local,
123 const SocketAddress& addr_remote); 123 const SocketAddress& addr_remote);
124 124
125 // For testing purpose only. Fired when a client socket is created.
126 sigslot::signal1<VirtualSocket*> SignalSocketCreated;
127
125 protected: 128 protected:
126 // Returns a new IP not used before in this network. 129 // Returns a new IP not used before in this network.
127 IPAddress GetNextIP(int family); 130 IPAddress GetNextIP(int family);
128 uint16_t GetNextPort(); 131 uint16_t GetNextPort();
129 132
130 VirtualSocket* CreateSocketInternal(int family, int type); 133 VirtualSocket* CreateSocketInternal(int family, int type);
131 134
132 // Binds the given socket to addr, assigning and IP and Port if necessary 135 // Binds the given socket to addr, assigning and IP and Port if necessary
133 int Bind(VirtualSocket* socket, SocketAddress* addr); 136 int Bind(VirtualSocket* socket, SocketAddress* addr);
134 137
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 352
350 // Store the options that are set 353 // Store the options that are set
351 OptionsMap options_map_; 354 OptionsMap options_map_;
352 355
353 friend class VirtualSocketServer; 356 friend class VirtualSocketServer;
354 }; 357 };
355 358
356 } // namespace rtc 359 } // namespace rtc
357 360
358 #endif // WEBRTC_BASE_VIRTUALSOCKETSERVER_H_ 361 #endif // WEBRTC_BASE_VIRTUALSOCKETSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/base/virtualsocketserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698