| 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 12 matching lines...) Expand all Loading... |
| 23 #include "net/tools/quic/platform/impl/quic_socket_utils.h" | 23 #include "net/tools/quic/platform/impl/quic_socket_utils.h" |
| 24 #include "net/tools/quic/quic_epoll_alarm_factory.h" | 24 #include "net/tools/quic/quic_epoll_alarm_factory.h" |
| 25 #include "net/tools/quic/quic_epoll_connection_helper.h" | 25 #include "net/tools/quic/quic_epoll_connection_helper.h" |
| 26 | 26 |
| 27 #ifndef SO_RXQ_OVFL | 27 #ifndef SO_RXQ_OVFL |
| 28 #define SO_RXQ_OVFL 40 | 28 #define SO_RXQ_OVFL 40 |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 // TODO(rtenneti): Add support for MMSG_MORE. | 31 // TODO(rtenneti): Add support for MMSG_MORE. |
| 32 #define MMSG_MORE 0 | 32 #define MMSG_MORE 0 |
| 33 using base::StringPiece; | |
| 34 using std::string; | 33 using std::string; |
| 35 | 34 |
| 36 namespace net { | 35 namespace net { |
| 37 | 36 |
| 38 const int kEpollFlags = EPOLLIN | EPOLLOUT | EPOLLET; | 37 const int kEpollFlags = EPOLLIN | EPOLLOUT | EPOLLET; |
| 39 | 38 |
| 40 QuicClient::QuicClient(QuicSocketAddress server_address, | 39 QuicClient::QuicClient(QuicSocketAddress server_address, |
| 41 const QuicServerId& server_id, | 40 const QuicServerId& server_id, |
| 42 const QuicVersionVector& supported_versions, | 41 const QuicVersionVector& supported_versions, |
| 43 EpollServer* epoll_server, | 42 EpollServer* epoll_server, |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 return fd_address_map_.back().first; | 182 return fd_address_map_.back().first; |
| 184 } | 183 } |
| 185 | 184 |
| 186 void QuicClient::ProcessPacket(const QuicSocketAddress& self_address, | 185 void QuicClient::ProcessPacket(const QuicSocketAddress& self_address, |
| 187 const QuicSocketAddress& peer_address, | 186 const QuicSocketAddress& peer_address, |
| 188 const QuicReceivedPacket& packet) { | 187 const QuicReceivedPacket& packet) { |
| 189 session()->ProcessUdpPacket(self_address, peer_address, packet); | 188 session()->ProcessUdpPacket(self_address, peer_address, packet); |
| 190 } | 189 } |
| 191 | 190 |
| 192 } // namespace net | 191 } // namespace net |
| OLD | NEW |