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

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

Issue 1556743002: Bind a socket to a network if the network handle is set. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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
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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 VirtualSocket* Accept(SocketAddress* paddr) override; 276 VirtualSocket* Accept(SocketAddress* paddr) override;
277 277
278 int GetError() const override; 278 int GetError() const override;
279 void SetError(int error) override; 279 void SetError(int error) override;
280 ConnState GetState() const override; 280 ConnState GetState() const override;
281 int GetOption(Option opt, int* value) override; 281 int GetOption(Option opt, int* value) override;
282 int SetOption(Option opt, int value) override; 282 int SetOption(Option opt, int value) override;
283 int EstimateMTU(uint16_t* mtu) override; 283 int EstimateMTU(uint16_t* mtu) override;
284 void OnMessage(Message* pmsg) override; 284 void OnMessage(Message* pmsg) override;
285 285
286 int BindToNetwork(NetworkHandle net_handle) override;
287
286 bool was_any() { return was_any_; } 288 bool was_any() { return was_any_; }
287 void set_was_any(bool was_any) { was_any_ = was_any; } 289 void set_was_any(bool was_any) { was_any_ = was_any; }
288 290
289 // For testing purpose only. Fired when client socket is bound to an address. 291 // For testing purpose only. Fired when client socket is bound to an address.
290 sigslot::signal2<VirtualSocket*, const SocketAddress&> SignalAddressReady; 292 sigslot::signal2<VirtualSocket*, const SocketAddress&> SignalAddressReady;
291 293
292 private: 294 private:
293 struct NetworkEntry { 295 struct NetworkEntry {
294 size_t size; 296 size_t size;
295 uint32_t done_time; 297 uint32_t done_time;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 350
349 // Store the options that are set 351 // Store the options that are set
350 OptionsMap options_map_; 352 OptionsMap options_map_;
351 353
352 friend class VirtualSocketServer; 354 friend class VirtualSocketServer;
353 }; 355 };
354 356
355 } // namespace rtc 357 } // namespace rtc
356 358
357 #endif // WEBRTC_BASE_VIRTUALSOCKETSERVER_H_ 359 #endif // WEBRTC_BASE_VIRTUALSOCKETSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698