Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: net/tools/quic/test_tools/quic_test_server.h

Issue 965943002: Fixing a bug in the QUIC prober where if we received a GOAWAY before (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Remove_dead_method_QuicUnackedPacketMap_RestoreInFlight_86690324
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_server.h ('k') | net/tools/quic/test_tools/quic_test_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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.
4
5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_
Ryan Hamilton 2015/02/28 00:29:48 Do we need this file? or is it only used by intern
ramant (doing other things) 2015/02/28 01:06:01 We don't use this. It is used only internally. Wil
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_
7
8 #include "net/tools/quic/quic_dispatcher.h"
9 #include "net/tools/quic/quic_server.h"
10 #include "net/tools/quic/quic_server_session.h"
11
12 namespace net {
13
14 namespace tools {
15
16 namespace test {
17
18 // A test server which enables easy creation of custom QuicServerSessions
19 //
20 // Eventually this may be extended to allow custom QuicConnections etc.
21 class QuicTestServer : public QuicServer {
22 public:
23 typedef std::function<QuicServerSession*(const QuicConfig& config,
24 QuicConnection* connection,
25 QuicServerSessionVisitor* visitor)>
26 SessionCreationFunction;
27
28 // Create a custom dispatcher which creates custom sessions.
29 QuicDispatcher* CreateQuicDispatcher() override;
30
31 void SetSessionCreator(const SessionCreationFunction& function);
32 };
33
34 // Useful test sessions for the QuicTestServer.
35
36 // Test session which sends a GOAWAY immedaitely on creation, before crypto
37 // credentials have even been established.
38 class ImmediateGoAwaySession : public QuicServerSession {
39 public:
40 ImmediateGoAwaySession(const QuicConfig& config,
41 QuicConnection* connection,
42 QuicServerSessionVisitor* visitor);
43 };
44
45 } // namespace test
46
47 } // namespace tools
48
49 } // namespace net
50
51 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server.h ('k') | net/tools/quic/test_tools/quic_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698