~ubuntu-branches/debian/stretch/libnice/stretch

« back to all changes in this revision

Viewing changes to socket/socket.h

  • Committer: Package Import Robot
  • Author(s): Simon McVittie
  • Date: 2014-05-14 12:00:13 UTC
  • mfrom: (1.2.9) (5.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20140514120013-fi5mh9bexrjnwnd8
Tags: 0.1.7-1
* New upstream release 0.1.6, 0.1.7
  - fixes various compiler warnings that were mistakenly fatal in 0.1.5
    (Closes: #743232, #743233)
  - update symbols file for new API
* Explicitly disable -Werror, even if we package a non-release in future
* Don't run tests during the build. We were ignoring failures already,
  and they sometimes hang until the buildd terminates them.
  Upstream (Olivier Crête) says they are stable enough to be useful
  for developers, but not for integration testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#ifndef _SOCKET_H
38
38
#define _SOCKET_H
39
39
 
 
40
#include "agent.h"
40
41
#include "address.h"
41
42
#include <gio/gio.h>
42
43
 
58
59
{
59
60
  NiceAddress addr;
60
61
  GSocket *fileno;
61
 
  gint (*recv) (NiceSocket *sock, NiceAddress *from, guint len,
62
 
      gchar *buf);
63
 
  gboolean (*send) (NiceSocket *sock, const NiceAddress *to, guint len,
64
 
      const gchar *buf);
 
62
  /* Implementations must handle any value of n_recv_messages, including 0. Iff
 
63
   * n_recv_messages is 0, recv_messages may be NULL. */
 
64
  gint (*recv_messages) (NiceSocket *sock,
 
65
      NiceInputMessage *recv_messages, guint n_recv_messages);
 
66
  /* As above, @n_messages may be zero. Iff so, @messages may be %NULL. */
 
67
  gint (*send_messages) (NiceSocket *sock, const NiceAddress *to,
 
68
      const NiceOutputMessage *messages, guint n_messages);
65
69
  gboolean (*is_reliable) (NiceSocket *sock);
66
70
  void (*close) (NiceSocket *sock);
67
71
  void *priv;
69
73
 
70
74
G_GNUC_WARN_UNUSED_RESULT
71
75
gint
72
 
nice_socket_recv (NiceSocket *sock, NiceAddress *from, guint len, gchar *buf);
 
76
nice_socket_recv_messages (NiceSocket *sock,
 
77
    NiceInputMessage *recv_messages, guint n_recv_messages);
73
78
 
74
 
gboolean
75
 
nice_socket_send (NiceSocket *sock, const NiceAddress *to,
76
 
  guint len, const gchar *buf);
 
79
gint
 
80
nice_socket_send_messages (NiceSocket *sock, const NiceAddress *addr,
 
81
    const NiceOutputMessage *messages, guint n_messages);
 
82
gssize
 
83
nice_socket_send (NiceSocket *sock, const NiceAddress *addr, gsize len,
 
84
    const gchar *buf);
77
85
 
78
86
gboolean
79
87
nice_socket_is_reliable (NiceSocket *sock);