2 * This file is part of the Nice GLib ICE library.
4 * (C) 2008-2009 Collabora Ltd.
5 * Contact: Youness Alaoui
6 * (C) 2008-2009 Nokia Corporation. All rights reserved.
8 * The contents of this file are subject to the Mozilla Public License Version
9 * 1.1 (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 * http://www.mozilla.org/MPL/
13 * Software distributed under the License is distributed on an "AS IS" basis,
14 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
15 * for the specific language governing rights and limitations under the
18 * The Original Code is the Nice GLib ICE library.
20 * The Initial Developers of the Original Code are Collabora Ltd and Nokia
21 * Corporation. All Rights Reserved.
24 * Youness Alaoui, Collabora Ltd.
26 * Alternatively, the contents of this file may be used under the terms of the
27 * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
28 * case the provisions of LGPL are applicable instead of those above. If you
29 * wish to allow use of your version of this file only under the terms of the
30 * LGPL and not to allow others to use your version of this file under the
31 * MPL, indicate your decision by deleting the provisions above and replace
32 * them with the notice and other provisions required by the LGPL. If you do
33 * not delete the provisions above, a recipient may use your version of this
34 * file under either the MPL or the LGPL.
47 #include <sys/types.h>
48 #include <sys/socket.h>
49 #include <netinet/in.h>
50 #include <arpa/inet.h>
55 typedef struct _NiceSocket NiceSocket
;
61 gint (*recv
) (NiceSocket
*sock
, NiceAddress
*from
, guint len
,
63 gboolean (*send
) (NiceSocket
*sock
, const NiceAddress
*to
, guint len
,
65 gboolean (*is_reliable
) (NiceSocket
*sock
);
66 void (*close
) (NiceSocket
*sock
);
70 G_GNUC_WARN_UNUSED_RESULT
72 nice_socket_recv (NiceSocket
*sock
, NiceAddress
*from
, guint len
, gchar
*buf
);
75 nice_socket_send (NiceSocket
*sock
, const NiceAddress
*to
,
76 guint len
, const gchar
*buf
);
79 nice_socket_is_reliable (NiceSocket
*sock
);
83 nice_socket_free (NiceSocket
*sock
);
87 #include "pseudossl.h"
95 #endif /* _SOCKET_H */