mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
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.
This commit is contained in:
parent
555c5a6376
commit
04bbf9df37
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user