[glib] gdatagrambased: Clarify that connection-oriented ≠ stream-based



commit 04bbf9df377bac2d2dd920c528756b1fd32da547
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Aug 3 18:46:29 2016 +0100

    gdatagrambased: Clarify that connection-oriented ≠ stream-based
    
    GDatagramBased allows connection-oriented and connection-less sockets,
    but does not allow stream-based sockets (because it’s datagram-based).
    So it supports SCTP and UDP, but not TCP.
    
    Clarify that in the documentation, and people sometimes confuse
    connection-oriented with stream-based, due to the prevalence of TCP.

 gio/gdatagrambased.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gio/gdatagrambased.c b/gio/gdatagrambased.c
index cd6e481..afb37e3 100644
--- a/gio/gdatagrambased.c
+++ b/gio/gdatagrambased.c
@@ -71,12 +71,13 @@
  * instance, on Windows a socket is always seen as writable until a write
  * returns %G_IO_ERROR_WOULD_BLOCK.
  *
- * As with #GSocket, #GDatagramBaseds can be either connection oriented or
- * connectionless. The interface does not cover connection establishment — use
- * methods on the underlying type to establish a connection before sending and
- * receiving data through the #GDatagramBased API. For connectionless socket
- * types the target/source address is specified or received in each I/O
- * operation.
+ * As with #GSocket, #GDatagramBaseds can be either connection oriented (for
+ * example, SCTP) or connectionless (for example, UDP). #GDatagramBaseds must be
+ * datagram-based, not stream-based. The interface does not cover connection
+ * establishment — use methods on the underlying type to establish a connection
+ * before sending and receiving data through the #GDatagramBased API. For
+ * connectionless socket types the target/source address is specified or
+ * received in each I/O operation.
  *
  * Like most other APIs in GLib, #GDatagramBased is not inherently thread safe.
  * To use a #GDatagramBased concurrently from multiple threads, you must


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]