| OLD | NEW |
| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 virtual void SetError(int error) = 0; | 151 virtual void SetError(int error) = 0; |
| 152 inline bool IsBlocking() const { return IsBlockingError(GetError()); } | 152 inline bool IsBlocking() const { return IsBlockingError(GetError()); } |
| 153 | 153 |
| 154 enum ConnState { | 154 enum ConnState { |
| 155 CS_CLOSED, | 155 CS_CLOSED, |
| 156 CS_CONNECTING, | 156 CS_CONNECTING, |
| 157 CS_CONNECTED | 157 CS_CONNECTED |
| 158 }; | 158 }; |
| 159 virtual ConnState GetState() const = 0; | 159 virtual ConnState GetState() const = 0; |
| 160 | 160 |
| 161 // Fills in the given uint16 with the current estimate of the MTU along the | 161 // Fills in the given uint16_t with the current estimate of the MTU along the |
| 162 // path to the address to which this socket is connected. NOTE: This method | 162 // path to the address to which this socket is connected. NOTE: This method |
| 163 // can block for up to 10 seconds on Windows. | 163 // can block for up to 10 seconds on Windows. |
| 164 virtual int EstimateMTU(uint16* mtu) = 0; | 164 virtual int EstimateMTU(uint16_t* mtu) = 0; |
| 165 | 165 |
| 166 enum Option { | 166 enum Option { |
| 167 OPT_DONTFRAGMENT, | 167 OPT_DONTFRAGMENT, |
| 168 OPT_RCVBUF, // receive buffer size | 168 OPT_RCVBUF, // receive buffer size |
| 169 OPT_SNDBUF, // send buffer size | 169 OPT_SNDBUF, // send buffer size |
| 170 OPT_NODELAY, // whether Nagle algorithm is enabled | 170 OPT_NODELAY, // whether Nagle algorithm is enabled |
| 171 OPT_IPV6_V6ONLY, // Whether the socket is IPv6 only. | 171 OPT_IPV6_V6ONLY, // Whether the socket is IPv6 only. |
| 172 OPT_DSCP, // DSCP code | 172 OPT_DSCP, // DSCP code |
| 173 OPT_RTP_SENDTIME_EXTN_ID, // This is a non-traditional socket option param. | 173 OPT_RTP_SENDTIME_EXTN_ID, // This is a non-traditional socket option param. |
| 174 // This is specific to libjingle and will be used | 174 // This is specific to libjingle and will be used |
| 175 // if SendTime option is needed at socket level. | 175 // if SendTime option is needed at socket level. |
| 176 }; | 176 }; |
| 177 virtual int GetOption(Option opt, int* value) = 0; | 177 virtual int GetOption(Option opt, int* value) = 0; |
| 178 virtual int SetOption(Option opt, int value) = 0; | 178 virtual int SetOption(Option opt, int value) = 0; |
| 179 | 179 |
| 180 protected: | 180 protected: |
| 181 Socket() {} | 181 Socket() {} |
| 182 | 182 |
| 183 private: | 183 private: |
| 184 RTC_DISALLOW_COPY_AND_ASSIGN(Socket); | 184 RTC_DISALLOW_COPY_AND_ASSIGN(Socket); |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 } // namespace rtc | 187 } // namespace rtc |
| 188 | 188 |
| 189 #endif // WEBRTC_BASE_SOCKET_H__ | 189 #endif // WEBRTC_BASE_SOCKET_H__ |
| OLD | NEW |