Land Recent QUIC changes.
[chromium-blink-merge.git] / net / tools / quic / test_tools / quic_server_peer.cc
blob15f31297d1752090bff82a42495523ddd63900d2
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/tools/quic/test_tools/quic_server_peer.h"
7 #include "net/tools/quic/quic_dispatcher.h"
8 #include "net/tools/quic/quic_server.h"
10 namespace net {
11 namespace tools {
12 namespace test {
14 // static
15 bool QuicServerPeer::SetSmallSocket(QuicServer* server) {
16 int size = 1024 * 10;
17 return setsockopt(
18 server->fd_, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) != -1;
21 // static
22 void QuicServerPeer::DisableRecvmmsg(QuicServer* server) {
23 server->use_recvmmsg_ = false;
26 // static
27 QuicDispatcher* QuicServerPeer::GetDispatcher(QuicServer* server) {
28 return server->dispatcher_.get();
31 // static
32 int QuicServerPeer::GetFD(QuicServer* server) {
33 return server->fd_;
36 } // namespace test
37 } // namespace tools
38 } // namespace net