blob: d1f63152626ead3a2399228ec6849cd0ce413ea7 [file] [log] [blame]
// Copyright 2015 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 "blimp/net/stream_socket_connection.h"
#include "base/memory/ptr_util.h"
#include "blimp/net/compressed_packet_reader.h"
#include "blimp/net/compressed_packet_writer.h"
#include "blimp/net/stream_packet_reader.h"
#include "blimp/net/stream_packet_writer.h"
namespace blimp {
StreamSocketConnection::StreamSocketConnection(
std::unique_ptr<net::StreamSocket> socket)
: BlimpConnection(
base::WrapUnique(new CompressedPacketReader(
base::WrapUnique(new StreamPacketReader(socket.get())))),
base::WrapUnique(new CompressedPacketWriter(
base::WrapUnique(new StreamPacketWriter(socket.get()))))),
socket_(std::move(socket)) {
DCHECK(socket_);
}
StreamSocketConnection::~StreamSocketConnection() {}
} // namespace blimp