diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-03-21 05:44:51 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-03-21 05:44:51 +0200 |
commit | 74824b0b51cacfc952abb11428c4108afb9e7194 (patch) | |
tree | 041c808a21260d7961b1dfcaeb2f2936a22ad602 /doc/gawkinet.texi | |
parent | f32d60edb8a3325e27953787b7fb9f051423b6bc (diff) | |
download | egawk-74824b0b51cacfc952abb11428c4108afb9e7194.tar.gz egawk-74824b0b51cacfc952abb11428c4108afb9e7194.tar.bz2 egawk-74824b0b51cacfc952abb11428c4108afb9e7194.zip |
Update doc on UDP client.
Diffstat (limited to 'doc/gawkinet.texi')
-rw-r--r-- | doc/gawkinet.texi | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/doc/gawkinet.texi b/doc/gawkinet.texi index 12274d04..0e0632a2 100644 --- a/doc/gawkinet.texi +++ b/doc/gawkinet.texi @@ -61,18 +61,19 @@ @c pages, I think this is the right decision. ADR. @set TITLE TCP/IP Internetworking with @command{gawk} -@set EDITION 1.3 -@set UPDATE-MONTH December, 2010 +@set EDITION 1.4 +@set UPDATE-MONTH March, 2016 @c gawk versions: -@set VERSION 4.0 -@set PATCHLEVEL 0 +@set VERSION 4.1 +@set PATCHLEVEL 4 @copying This is Edition @value{EDITION} of @cite{@value{TITLE}}, for the @value{VERSION}.@value{PATCHLEVEL} (or later) version of the GNU implementation of AWK. @sp 2 -Copyright (C) 2000, 2001, 2002, 2004, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2004, 2009, 2010, 2016 +Free Software Foundation, Inc. @sp 2 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -831,17 +832,33 @@ The receiver is almost identical to the TCP receiver: @example # Client BEGIN @{ + print "hi!" |& "/inet/udp/0/localhost/8888" "/inet/udp/0/localhost/8888" |& getline print $0 close("/inet/udp/0/localhost/8888") @} @end example +In the case of UDP, the initial @code{print} command is the one +that actually sends data so that there is a connection. +UDP and ``connection'' sounds strange to anyone +who has learned that UDP is a connectionless protocol. +Here, ``connection'' means that the @code{connect()} system call +has completed its work and completed the ``association'' +between a certain socket and an IP address. Thus there are +subtle differences between @code{connect()} for TCP and UDP; +see the man page for details.@footnote{This subtlety +is just one of many details that are hidden in the socket +API, invisible and intractable for the @command{gawk} user. +The developers are currently considering how to rework the +network facilities to make them easier to understand and use.} + UDP cannot guarantee that the datagrams at the receiving end will arrive in exactly the same order they were sent. Some datagrams could be lost, some doubled, and some out of order. But no overhead is necessary to accomplish this. This unreliable behavior is good enough for tasks -such as data acquisition, logging, and even stateless services like NFS. +such as data acquisition, logging, and even stateless services like +the original versions of NFS. @node TCP Connecting, Troubleshooting, Gawk Special Files, Using Networking @section Establishing a TCP Connection |