• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 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 #include "osp/public/protocol_connection_client_factory.h"
6 
7 #include <memory>
8 
9 #include "osp/impl/quic/quic_client.h"
10 #include "osp/impl/quic/quic_connection_factory_impl.h"
11 #include "osp/public/network_service_manager.h"
12 #include "platform/api/task_runner.h"
13 #include "platform/api/time.h"
14 
15 namespace openscreen {
16 namespace osp {
17 
18 // static
19 std::unique_ptr<ProtocolConnectionClient>
Create(MessageDemuxer * demuxer,ProtocolConnectionServiceObserver * observer,TaskRunner * task_runner)20 ProtocolConnectionClientFactory::Create(
21     MessageDemuxer* demuxer,
22     ProtocolConnectionServiceObserver* observer,
23     TaskRunner* task_runner) {
24   return std::make_unique<QuicClient>(
25       demuxer, std::make_unique<QuicConnectionFactoryImpl>(task_runner),
26       observer, &Clock::now, task_runner);
27 }
28 
29 }  // namespace osp
30 }  // namespace openscreen
31