| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/tools/quic/quic_client.h" | 5 #include "net/tools/quic/quic_client.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <netinet/in.h> | 8 #include <netinet/in.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <sys/epoll.h> | 10 #include <sys/epoll.h> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 STLDeleteElements(&data_sent_before_handshake_); | 81 STLDeleteElements(&data_sent_before_handshake_); |
| 82 | 82 |
| 83 CleanUpUDPSocketImpl(); | 83 CleanUpUDPSocketImpl(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool QuicClient::Initialize() { | 86 bool QuicClient::Initialize() { |
| 87 QuicClientBase::Initialize(); | 87 QuicClientBase::Initialize(); |
| 88 | 88 |
| 89 // If an initial flow control window has not explicitly been set, then use the | 89 // If an initial flow control window has not explicitly been set, then use the |
| 90 // same values that Chrome uses. | 90 // same values that Chrome uses. |
| 91 const uint32 kSessionMaxRecvWindowSize = 15 * 1024 * 1024; // 15 MB | 91 const uint32_t kSessionMaxRecvWindowSize = 15 * 1024 * 1024; // 15 MB |
| 92 const uint32 kStreamMaxRecvWindowSize = 6 * 1024 * 1024; // 6 MB | 92 const uint32_t kStreamMaxRecvWindowSize = 6 * 1024 * 1024; // 6 MB |
| 93 if (config()->GetInitialStreamFlowControlWindowToSend() == | 93 if (config()->GetInitialStreamFlowControlWindowToSend() == |
| 94 kMinimumFlowControlSendWindow) { | 94 kMinimumFlowControlSendWindow) { |
| 95 config()->SetInitialStreamFlowControlWindowToSend(kStreamMaxRecvWindowSize); | 95 config()->SetInitialStreamFlowControlWindowToSend(kStreamMaxRecvWindowSize); |
| 96 } | 96 } |
| 97 if (config()->GetInitialSessionFlowControlWindowToSend() == | 97 if (config()->GetInitialSessionFlowControlWindowToSend() == |
| 98 kMinimumFlowControlSendWindow) { | 98 kMinimumFlowControlSendWindow) { |
| 99 config()->SetInitialSessionFlowControlWindowToSend( | 99 config()->SetInitialSessionFlowControlWindowToSend( |
| 100 kSessionMaxRecvWindowSize); | 100 kSessionMaxRecvWindowSize); |
| 101 } | 101 } |
| 102 | 102 |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 QuicEncryptedPacket packet(buf, bytes_read, false); | 471 QuicEncryptedPacket packet(buf, bytes_read, false); |
| 472 | 472 |
| 473 IPEndPoint client_address(client_ip, client_address_.port()); | 473 IPEndPoint client_address(client_ip, client_address_.port()); |
| 474 session()->connection()->ProcessUdpPacket(client_address, server_address, | 474 session()->connection()->ProcessUdpPacket(client_address, server_address, |
| 475 packet); | 475 packet); |
| 476 return true; | 476 return true; |
| 477 } | 477 } |
| 478 | 478 |
| 479 } // namespace tools | 479 } // namespace tools |
| 480 } // namespace net | 480 } // namespace net |
| OLD | NEW |