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 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_
8 #include "net/tools/quic/quic_dispatcher.h"
10 #include "net/base/ip_endpoint.h"
15 class QuicPacketWriterWrapper
;
19 class QuicDispatcherPeer
{
21 static void SetTimeWaitListManager(
22 QuicDispatcher
* dispatcher
,
23 QuicTimeWaitListManager
* time_wait_list_manager
);
25 // Injects |writer| into |dispatcher| as the shared writer.
26 static void UseWriter(QuicDispatcher
* dispatcher
,
27 QuicPacketWriterWrapper
* writer
);
29 static QuicPacketWriter
* GetWriter(QuicDispatcher
* dispatcher
);
31 static void SetPacketWriterFactory(
32 QuicDispatcher
* dispatcher
,
33 QuicDispatcher::PacketWriterFactory
* packet_writer_factory
);
35 static QuicConnectionHelperInterface
* GetHelper(QuicDispatcher
* dispatcher
);
37 static QuicDispatcher::WriteBlockedList
* GetWriteBlockedList(
38 QuicDispatcher
* dispatcher
);
40 // Get the dispatcher's record of the last error reported to its framer
41 // visitor's OnError() method. Then set that record to QUIC_NO_ERROR.
42 static QuicErrorCode
GetAndClearLastError(QuicDispatcher
* dispatcher
);
45 DISALLOW_COPY_AND_ASSIGN(QuicDispatcherPeer
);
52 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_