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

Side by Side Diff: net/tools/quic/quic_default_packet_writer.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
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_client_test.cc ('k') | net/tools/quic/quic_default_packet_writer.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 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.
4
5 #ifndef NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
6 #define NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
7
8 #include "base/basictypes.h"
9 #include "net/base/ip_endpoint.h"
10 #include "net/quic/quic_packet_writer.h"
11
12 namespace net {
13
14 struct WriteResult;
15
16 namespace tools {
17
18 // Default packet writer which wraps QuicSocketUtils WritePacket.
19 class QuicDefaultPacketWriter : public QuicPacketWriter {
20 public:
21 explicit QuicDefaultPacketWriter(int fd);
22 ~QuicDefaultPacketWriter() override;
23
24 // QuicPacketWriter
25 WriteResult WritePacket(const char* buffer,
26 size_t buf_len,
27 const IPAddressNumber& self_address,
28 const IPEndPoint& peer_address) override;
29 bool IsWriteBlockedDataBuffered() const override;
30 bool IsWriteBlocked() const override;
31 void SetWritable() override;
32
33 void set_fd(int fd) { fd_ = fd; }
34
35 protected:
36 void set_write_blocked(bool is_blocked) {
37 write_blocked_ = is_blocked;
38 }
39 int fd() { return fd_; }
40
41 private:
42 int fd_;
43 bool write_blocked_;
44
45 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter);
46 };
47
48 } // namespace tools
49 } // namespace net
50
51 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_test.cc ('k') | net/tools/quic/quic_default_packet_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698