1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 * Copyright (C) 2021 Ole André Vadla Ravnås <oleavr@frida.re>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, see
17 * <http://www.gnu.org/licenses/>.
36 typedef struct _IODetails IODetails;
38 typedef IODecision (*IOPredicateFunc) (const IODetails *io,
43 IODirection direction;
47 #define LOSSY_TYPE_SOCKET (lossy_socket_get_type ())
49 G_DECLARE_FINAL_TYPE (LossySocket, lossy_socket, LOSSY, SOCKET, GObject)
51 GDatagramBased *lossy_socket_new (GDatagramBased *base_socket,
52 IOPredicateFunc predicate_func,
53 gpointer predicate_data);