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

Side by Side Diff: webrtc/base/physicalsocketserver.cc

Issue 1891293002: Adds clearer function to create rtc::Thread without Physical SocketServer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « webrtc/base/nullsocketserver.cc ('k') | webrtc/base/socketserver.h » ('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 #include "webrtc/base/physicalsocketserver.h" 10 #include "webrtc/base/physicalsocketserver.h"
(...skipping 28 matching lines...) Expand all
39 39
40 #include <algorithm> 40 #include <algorithm>
41 #include <map> 41 #include <map>
42 42
43 #include "webrtc/base/arraysize.h" 43 #include "webrtc/base/arraysize.h"
44 #include "webrtc/base/basictypes.h" 44 #include "webrtc/base/basictypes.h"
45 #include "webrtc/base/byteorder.h" 45 #include "webrtc/base/byteorder.h"
46 #include "webrtc/base/common.h" 46 #include "webrtc/base/common.h"
47 #include "webrtc/base/logging.h" 47 #include "webrtc/base/logging.h"
48 #include "webrtc/base/networkmonitor.h" 48 #include "webrtc/base/networkmonitor.h"
49 #include "webrtc/base/nullsocketserver.h"
49 #include "webrtc/base/timeutils.h" 50 #include "webrtc/base/timeutils.h"
50 #include "webrtc/base/winping.h" 51 #include "webrtc/base/winping.h"
51 #include "webrtc/base/win32socketinit.h" 52 #include "webrtc/base/win32socketinit.h"
52 53
53 #if defined(WEBRTC_POSIX) 54 #if defined(WEBRTC_POSIX)
54 #include <netinet/tcp.h> // for TCP_NODELAY 55 #include <netinet/tcp.h> // for TCP_NODELAY
55 #define IP_MTU 14 // Until this is integrated from linux/in.h to netinet/in.h 56 #define IP_MTU 14 // Until this is integrated from linux/in.h to netinet/in.h
56 typedef void* SockOptArg; 57 typedef void* SockOptArg;
57 #endif // WEBRTC_POSIX 58 #endif // WEBRTC_POSIX
58 59
59 #if defined(WEBRTC_WIN) 60 #if defined(WEBRTC_WIN)
60 typedef char* SockOptArg; 61 typedef char* SockOptArg;
61 #endif 62 #endif
62 63
63 namespace rtc { 64 namespace rtc {
64 65
66 std::unique_ptr<SocketServer> SocketServer::CreateDefault() {
67 #if defined(__native_client__)
68 return std::unique_ptr<SocketServer>(new rtc::NullSocketServer);
69 #else
70 return std::unique_ptr<SocketServer>(new rtc::PhysicalSocketServer);
71 #endif
72 }
73
65 #if defined(WEBRTC_WIN) 74 #if defined(WEBRTC_WIN)
66 // Standard MTUs, from RFC 1191 75 // Standard MTUs, from RFC 1191
67 const uint16_t PACKET_MAXIMUMS[] = { 76 const uint16_t PACKET_MAXIMUMS[] = {
68 65535, // Theoretical maximum, Hyperchannel 77 65535, // Theoretical maximum, Hyperchannel
69 32000, // Nothing 78 32000, // Nothing
70 17914, // 16Mb IBM Token Ring 79 17914, // 16Mb IBM Token Ring
71 8166, // IEEE 802.4 80 8166, // IEEE 802.4
72 // 4464, // IEEE 802.5 (4Mb max) 81 // 4464, // IEEE 802.5 (4Mb max)
73 4352, // FDDI 82 4352, // FDDI
74 // 2048, // Wideband Network 83 // 2048, // Wideband Network
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 break; 1627 break;
1619 } 1628 }
1620 } 1629 }
1621 1630
1622 // Done 1631 // Done
1623 return true; 1632 return true;
1624 } 1633 }
1625 #endif // WEBRTC_WIN 1634 #endif // WEBRTC_WIN
1626 1635
1627 } // namespace rtc 1636 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/nullsocketserver.cc ('k') | webrtc/base/socketserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698