blob: e1b1eae6a31d735b703af24b58cc8184b8c1dcb9 [file] [log] [blame]
kwiberg@webrtc.org67186fe2015-03-09 22:21:531/*
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 04:47:3111#include "rtc_base/asyncpacketsocket.h"
kwiberg@webrtc.org67186fe2015-03-09 22:21:5312
13namespace rtc {
14
Qingsi Wang6e641e62018-04-12 03:14:1715PacketTimeUpdateParams::PacketTimeUpdateParams() = default;
16
17PacketTimeUpdateParams::PacketTimeUpdateParams(
18 const PacketTimeUpdateParams& other) = default;
kwiberg@webrtc.org67186fe2015-03-09 22:21:5319
20PacketTimeUpdateParams::~PacketTimeUpdateParams() = default;
21
Qingsi Wang6e641e62018-04-12 03:14:1722PacketOptions::PacketOptions() = default;
23PacketOptions::PacketOptions(DiffServCodePoint dscp) : dscp(dscp) {}
24PacketOptions::PacketOptions(const PacketOptions& other) = default;
25PacketOptions::~PacketOptions() = default;
kwiberg@webrtc.org67186fe2015-03-09 22:21:5326
Qingsi Wang6e641e62018-04-12 03:14:1727AsyncPacketSocket::AsyncPacketSocket() = default;
28
29AsyncPacketSocket::~AsyncPacketSocket() = default;
30
31void CopySocketInformationToPacketInfo(size_t packet_size_bytes,
32 const AsyncPacketSocket& socket_from,
Qingsi Wang4ea53b32018-04-17 01:22:3133 bool is_connectionless,
Qingsi Wang6e641e62018-04-12 03:14:1734 rtc::PacketInfo* info) {
35 info->packet_size_bytes = packet_size_bytes;
36 info->local_socket_address = socket_from.GetLocalAddress();
Qingsi Wang4ea53b32018-04-17 01:22:3137 if (!is_connectionless) {
38 info->remote_socket_address = socket_from.GetRemoteAddress();
39 }
kwiberg@webrtc.org67186fe2015-03-09 22:21:5340}
41
42}; // namespace rtc