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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 int Listen(int backlog) override { return socket_->Listen(backlog); } | 224 int Listen(int backlog) override { return socket_->Listen(backlog); } |
225 AsyncSocket* Accept(SocketAddress* paddr) override { | 225 AsyncSocket* Accept(SocketAddress* paddr) override { |
226 return socket_->Accept(paddr); | 226 return socket_->Accept(paddr); |
227 } | 227 } |
228 int GetError() const override { return socket_->GetError(); } | 228 int GetError() const override { return socket_->GetError(); } |
229 void SetError(int error) override { socket_->SetError(error); } | 229 void SetError(int error) override { socket_->SetError(error); } |
230 ConnState GetState() const override { | 230 ConnState GetState() const override { |
231 return connected_ ? CS_CONNECTED : CS_CLOSED; | 231 return connected_ ? CS_CONNECTED : CS_CLOSED; |
232 } | 232 } |
233 int EstimateMTU(uint16_t* mtu) override { return socket_->EstimateMTU(mtu); } | |
234 int GetOption(Option opt, int* value) override { | 233 int GetOption(Option opt, int* value) override { |
235 return socket_->GetOption(opt, value); | 234 return socket_->GetOption(opt, value); |
236 } | 235 } |
237 int SetOption(Option opt, int value) override { | 236 int SetOption(Option opt, int value) override { |
238 return socket_->SetOption(opt, value); | 237 return socket_->SetOption(opt, value); |
239 } | 238 } |
240 | 239 |
241 void OnConnectEvent(AsyncSocket* socket) { | 240 void OnConnectEvent(AsyncSocket* socket) { |
242 // If we're NATed, we need to send a message with the real addr to use. | 241 // If we're NATed, we need to send a message with the real addr to use. |
243 RTC_DCHECK(socket == socket_); | 242 RTC_DCHECK(socket == socket_); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 NATSocketServer::Translator* NATSocketServer::TranslatorMap::FindClient( | 500 NATSocketServer::Translator* NATSocketServer::TranslatorMap::FindClient( |
502 const SocketAddress& int_ip) { | 501 const SocketAddress& int_ip) { |
503 Translator* nat = nullptr; | 502 Translator* nat = nullptr; |
504 for (TranslatorMap::iterator it = begin(); it != end() && !nat; ++it) { | 503 for (TranslatorMap::iterator it = begin(); it != end() && !nat; ++it) { |
505 nat = it->second->FindClient(int_ip); | 504 nat = it->second->FindClient(int_ip); |
506 } | 505 } |
507 return nat; | 506 return nat; |
508 } | 507 } |
509 | 508 |
510 } // namespace rtc | 509 } // namespace rtc |
OLD | NEW |