summaryrefslogtreecommitdiffstats
path: root/net/tools/quic/quic_default_packet_writer.cc
blob: 541d86d67a74e666a4cc95a859aa9a6e4ed0406d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/tools/quic/quic_default_packet_writer.h"

#include "net/tools/quic/quic_socket_utils.h"

namespace net {
namespace tools {

QuicDefaultPacketWriter::QuicDefaultPacketWriter(int fd) : fd_(fd) {}

WriteResult QuicDefaultPacketWriter::WritePacket(
    const char* buffer, size_t buf_len,
    const net::IPAddressNumber& self_address,
    const net::IPEndPoint& peer_address,
    QuicBlockedWriterInterface* blocked_writer) {
  return QuicSocketUtils::WritePacket(fd_, buffer, buf_len,
                                      self_address, peer_address);
}

bool QuicDefaultPacketWriter::IsWriteBlockedDataBuffered() const {
  return false;
}

}  // namespace tools
}  // namespace net