blob: 1bd96fd1b23fa8df7f8ffc2e558d8b3a47620ad9 [file] [log] [blame]
Ryan Keanedeb48b32019-06-28 16:24:40 -07001// Copyright 2019 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 "platform/api/udp_socket.h"
6
7namespace openscreen {
8namespace platform {
9
10UdpSocket::UdpSocket() {
11 deletion_callback_ = [](UdpSocket* socket) {};
12}
13
14UdpSocket::~UdpSocket() {
15 deletion_callback_(this);
16}
17
18void UdpSocket::SetDeletionCallback(std::function<void(UdpSocket*)> callback) {
19 deletion_callback_ = callback;
20}
21
22} // namespace platform
23} // namespace openscreen