{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.lYfu4YUf/b1/adasockets_1.14-1_armhf.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.lYfu4YUf/b2/adasockets_1.14-1_armhf.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,5 +1,5 @@\n \n 2d9c0122457955323d9f1d7be9daba87 62640 libdevel optional libadasockets-dev_1.14-1_armhf.deb\n- ec349c416191bd4e4d69b797a4f9418e 273900 doc optional libadasockets-doc_1.14-1_all.deb\n+ 81713d6d562f60709c5b92682c9cee70 274064 doc optional libadasockets-doc_1.14-1_all.deb\n 964b5f2432eb9a0aa66d426b567bb3e3 52540 debug optional libadasockets11-dbgsym_1.14-1_armhf.deb\n aeb337ff112eb364205f2ebebc7e3bec 28136 libs optional libadasockets11_1.14-1_armhf.deb\n"}, {"source1": "libadasockets-doc_1.14-1_all.deb", "source2": "libadasockets-doc_1.14-1_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2024-03-17 16:33:20.000000 debian-binary\n -rw-r--r-- 0 0 0 1064 2024-03-17 16:33:20.000000 control.tar.xz\n--rw-r--r-- 0 0 0 272644 2024-03-17 16:33:20.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 272808 2024-03-17 16:33:20.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,21 +1,21 @@\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./usr/\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./usr/share/\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./usr/share/doc/\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./usr/share/doc/libadasockets-dev/\n -rw-r--r-- 0 root (0) root (0) 2311 2023-12-28 23:42:12.000000 ./usr/share/doc/libadasockets-dev/README.md\n--rw-r--r-- 0 root (0) root (0) 250937 2024-03-17 16:33:20.000000 ./usr/share/doc/libadasockets-dev/adasockets.pdf.gz\n+-rw-r--r-- 0 root (0) root (0) 251084 2024-03-17 16:33:20.000000 ./usr/share/doc/libadasockets-dev/adasockets.pdf.gz\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./usr/share/doc/libadasockets-dev/examples/\n -rw-r--r-- 0 root (0) root (0) 233 2024-01-27 17:32:23.000000 ./usr/share/doc/libadasockets-dev/examples/examples.gpr\n -rw-r--r-- 0 root (0) root (0) 4958 2023-12-28 23:42:12.000000 ./usr/share/doc/libadasockets-dev/examples/listener.adb\n -rw-r--r-- 0 root (0) root (0) 3982 2023-12-28 23:42:12.000000 ./usr/share/doc/libadasockets-dev/examples/multi.adb\n -rw-r--r-- 0 root (0) root (0) 4593 2023-12-28 23:42:12.000000 ./usr/share/doc/libadasockets-dev/examples/stream_listener.adb\n -rw-r--r-- 0 root (0) root (0) 3906 2023-12-28 23:42:12.000000 ./usr/share/doc/libadasockets-dev/examples/stream_sender.adb\n -rw-r--r-- 0 root (0) root (0) 4921 2023-12-28 23:42:12.000000 ./usr/share/doc/libadasockets-dev/examples/tcprelay.adb\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./usr/share/doc/libadasockets-doc/\n -rw-r--r-- 0 root (0) root (0) 1561 2024-03-17 16:33:20.000000 ./usr/share/doc/libadasockets-doc/changelog.Debian.gz\n -rw-r--r-- 0 root (0) root (0) 3026 2024-03-17 16:33:20.000000 ./usr/share/doc/libadasockets-doc/copyright\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./usr/share/doc-base/\n -rw-r--r-- 0 root (0) root (0) 475 2024-01-27 17:32:23.000000 ./usr/share/doc-base/libadasockets-doc.adasockets\n drwxr-xr-x 0 root (0) root (0) 0 2024-03-17 16:33:20.000000 ./usr/share/info/\n--rw-r--r-- 0 root (0) root (0) 14112 2024-03-17 16:33:20.000000 ./usr/share/info/adasockets.info.gz\n+-rw-r--r-- 0 root (0) root (0) 14117 2024-03-17 16:33:20.000000 ./usr/share/info/adasockets.info.gz\n"}, {"source1": "./usr/share/doc/libadasockets-dev/adasockets.pdf.gz", "source2": "./usr/share/doc/libadasockets-dev/adasockets.pdf.gz", "unified_diff": null, "details": [{"source1": "adasockets.pdf", "source2": "adasockets.pdf", "unified_diff": null, "details": [{"source1": "pdftotext {} -", "source2": "pdftotext {} -", "unified_diff": "@@ -38,31 +38,31 @@\n Setting up multicast sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n Sending and receiving data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6\n 3.4.1 Raw data manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6\n 3.4.2 String-oriented exchanges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6\n \n Sockets package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7\n Accept Socket (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7\n-Bind (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7\n+Bind (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Connect (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Get (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9\n Get Char (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9\n Get Line (function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10\n Get Line (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10\n Get Receive Queue Size (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11\n Get Send Queue Size (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11\n Getsockopt (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12\n Listen (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12\n New Line (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n Put (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n-Put Line (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n+Put Line (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14\n Receive (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14\n-Receive (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14\n+Receive (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15\n Receive Some (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15\n-Send (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15\n+Send (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n Set Buffer (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n Setsockopt (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n Shutdown (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n Socket (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n Unset Buffer (procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18\n \n 5\n@@ -71,37 +71,37 @@\n Create Multicast Socket (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19\n Create Multicast Socket (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20\n \n \fii\n \n 6\n \n-Sockets.Naming package . . . . . . . . . . . . . . . . . . . . . . . 23\n-Address Of (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n-Any Address (function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n-Get Peer Addr (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n-Get Peer Port (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n-Get Sock Addr (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n-Get Sock Port (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25\n-Host Name (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25\n-Image (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25\n-Info Of Name Or IP (function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26\n-Is IP Address (function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26\n-Name Of (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26\n-Value (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27\n+Sockets.Naming package . . . . . . . . . . . . . . . . . . . . . . . 21\n+Address Of (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21\n+Any Address (function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22\n+Get Peer Addr (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22\n+Get Peer Port (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22\n+Get Sock Addr (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22\n+Get Sock Port (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n+Host Name (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n+Image (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n+Info Of Name Or IP (function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n+Is IP Address (function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n+Name Of (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n+Value (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25\n \n Appendix A\n \n-Contributors. . . . . . . . . . . . . . . . . . . . . . . . 29\n+Contributors. . . . . . . . . . . . . . . . . . . . . . . . 27\n \n Appendix B\n \n-Resources on the Internet . . . . . . . . . 31\n+Resources on the Internet . . . . . . . . . 29\n \n-Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33\n+Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31\n \n \f1\n \n 1 What is AdaSockets?\n AdaSockets is a set of free software Ada packages allowing Ada programmers to use the\n so-called BSD sockets from their favourite programming language. AdaSockets has been\n designed and tested with the GNAT free software Ada compiler, but should be portable to\n@@ -113,15 +113,15 @@\n AdaSockets philosophy is to help the Ada programmer by providing easy-to-use objects.\n Special care has been taken to ensure that performances do however remain good.\n \n \f\f3\n \n 2 Installing AdaSockets\n Installing AdaSockets on a Unix or OpenVMS machine is as simple as typing a few commands. Once you got the latest version of AdaSockets (see Appendix B [Resources on\n-the Internet], page 31), uncompress and untar it and go to the top-level directory of the\n+the Internet], page 29), uncompress and untar it and go to the top-level directory of the\n distribution.\n You must configure the AdaSockets distribution by using the configure command, such\n as in:\n ./configure --prefix=/users/sam/adasockets\n If you want to install AdaSockets under the /usr/local hierarchy, you do not need to\n specify the --prefix option. Make sure you have write permission on the target directories.\n Once AdaSockets is configured, you can compile and install it by using the make command:\n@@ -219,16 +219,17 @@\n \n Accept Socket (procedure)\n Purpose\n \n Accept an incoming connection\n \n Prototype\n-[Sockets.Accept Socket]\n+\n procedure Accept_Socket\n+[Sockets.Accept Socket]\n (Socket : Socket FD; New_Socket : out Socket FD);\n Parameters\n Socket\n New Socket\n \n in\n out\n@@ -241,37 +242,47 @@\n on TCP socket Socket. All the communications with the peer will take place\n on New Socket, while the program can accept another connection on Socket.\n New Socket must not be initialized before calling this procedure, or must have\n been cleaned up by calling Shutdown, in order to avoid a file descriptors leak.\n Accept_Socket will block until an incoming connection is ready to be accepted.\n Example\n declare\n-Sock : Multicast_Socket_FD;\n+Sock\n+: Socket_FD;\n+Incoming : Socket_FD;\n begin\n--- Create a multicast socket on group 224.1.2.3 port 8763\n-Sock := Create_Multicast_Socket (\"224.1.2.3\", 8763);\n--- Perform some operations on socket\n-[...]\n--- Shutdown the socket in both directions\n-Shutdown (Sock, Both);\n+-- Create a TCP socket listening on local port 4161\n+Socket (Sock, PF_INET, SOCK_STREAM);\n+Bind (Sock, 4161);\n+Listen (Sock, 3);\n+-- One-connection-at-a-time server (3 may be pending)\n+loop\n+-- Wait for a new connection and accept it\n+Accept_Socket (Sock, Incoming);\n+-- Do some dialog with the remote host\n+Do_Some_Dialog (Incoming);\n+-- Close incoming socket and wait for next connection\n+Shutdown (Incoming);\n+end loop;\n end;\n-See also [Bind (procedure)], page 7,\n+\n+\f8\n+\n+AdaSockets reference manual\n+\n+See also [Bind (procedure)], page 8,\n [Listen (procedure)], page 12,\n [Shutdown (procedure)], page 17,\n [Socket (procedure)], page 17.\n \n Bind (procedure)\n Purpose\n \n Associate a local port to a socket\n \n-\f8\n-\n-AdaSockets reference manual\n-\n Prototype\n \n procedure Bind (Socket : Socket FD;\n Port : Natural; Host : String := \"\");\n Parameters\n Socket\n Port\n@@ -286,15 +297,15 @@\n Initialized socket object\n Local port to bind to\n Local interface to bind to\n \n Description\n This procedure requests a local port from the operating system. If 0 is given\n in Port, the system will assign a free port whose number can later be retrieved\n-using [Get Sock Port (function)], page 25. Also, most operating systems require\n+using [Get Sock Port (function)], page 23. Also, most operating systems require\n special privileges if you want to bind to ports below 1024.\n If Host is not the empty string, it must contain the IP address of a local interface\n to bind to, or a name which resolves into such an address. If an empty string\n is given (the default), the socket will be bound to all the available interfaces.\n Exceptions\n Socket_Error\n \n@@ -334,25 +345,24 @@\n Exceptions\n Connection_Refused\n Socket_Error\n \n The connection has been refused by the server\n Another error occurred during the connection\n \n+\fChapter 4: Sockets package\n+\n+9\n+\n Example\n declare\n Sock : Socket_FD;\n begin\n -- Create a TCP socket\n Socket (Sock, PF_INET, SOCK_STREAM);\n-\n-\fChapter 4: Sockets package\n-\n-9\n-\n -- Connect it to rfc1149.net\u2019s mail server\n Connect (Sock, \"mail.rfc1149.net\", 25);\n -- Do a mail transaction then close the socket\n [...]\n end;\n See also [Socket (procedure)], page 17.\n \n@@ -405,31 +415,31 @@\n \n in\n \n [Sockets.Get Char]\n \n Initialized and connected socket object\n \n+\f10\n+\n+AdaSockets reference manual\n+\n Return value\n One character sent by the remote host\n Description\n This function receives exactly one character from the remote host.\n Exceptions\n Connection_Closed\n \n Peer has closed the connection before sending the character\n \n-\f10\n-\n-AdaSockets reference manual\n-\n See also [Get (function)], page 9,\n [Get Line (function)], page 10,\n [Get Line (procedure)], page 10,\n-[Receive (procedure)], page 14,\n+[Receive (procedure)], page 15,\n [Set Buffer (procedure)], page 16.\n \n Get Line (function)\n Purpose\n \n Get a whole line from a remote host\n \n@@ -463,22 +473,26 @@\n Connection_Closed\n \n Peer has closed the connection before sending a whole line\n \n See also [Get (function)], page 9,\n [Get Char (function)], page 9,\n [Get Line (procedure)], page 10,\n-[Receive (procedure)], page 14,\n+[Receive (procedure)], page 15,\n [Set Buffer (procedure)], page 16.\n \n Get Line (procedure)\n Purpose\n \n Get a whole line from a remote host\n \n+\fChapter 4: Sockets package\n+\n+11\n+\n Prototype\n \n procedure Get_Line (Socket : Socket FD\u2019Class;\n Str : in out String; Last : out Natural);\n Parameters\n Socket\n Str\n@@ -490,32 +504,28 @@\n \n [Sockets.Get Line]\n \n Initialized and connected socket object\n String to fill\n Last index used in the string\n \n-\fChapter 4: Sockets package\n-\n-11\n-\n Description\n This procedure receives one line from the remote host. A line consists into zero\n or more characters followed by an optional CR and by a LF. Those terminators\n are stripped before the line is returned.\n This procedure blocks until one full line has been received.\n Exceptions\n Connection_Closed\n \n Peer has closed the connection before sending a whole line\n \n See also [Get (function)], page 9,\n [Get Char (function)], page 9,\n [Get Line (function)], page 10,\n-[Receive (procedure)], page 14,\n+[Receive (procedure)], page 15,\n [Set Buffer (procedure)], page 16.\n \n Get Receive Queue Size (function)\n Purpose\n \n Return the size of the unread data in the input queue\n \n@@ -534,21 +544,25 @@\n Initialized and connected socket object\n \n Return value\n The non-negative size in bytes of the input queue\n Description\n This function is only available on Linux platforms. On other operating systems, it will return -2 to indicate that the necessary mechanisms to retrieve the\n information are not available.\n-See also [Receive (procedure)], page 14.\n+See also [Receive (procedure)], page 15.\n \n Get Send Queue Size (function)\n Purpose\n \n Return the size of the unsent data in the output queue\n \n+\f12\n+\n+AdaSockets reference manual\n+\n Prototype\n \n function Get_Send_Queue_Size\n (Socket : Socket FD\u2019Class)\n return Integer;\n Parameters\n Socket\n@@ -560,20 +574,15 @@\n Initialized and connected socket object\n \n Return value\n The non-negative size in bytes of the output queue\n Description\n This function is only available on Linux platforms. On other operating systems, it will return -2 to indicate that the necessary mechanisms to retrieve the\n information are not available.\n-\n-\f12\n-\n-AdaSockets reference manual\n-\n-See also [Send (procedure)], page 15.\n+See also [Send (procedure)], page 16.\n \n Getsockopt (procedure)\n Purpose\n \n Retrieve a socket option\n \n Prototype\n@@ -615,37 +624,40 @@\n \n Prototype\n \n procedure Listen (Socket : Socket FD;\n Queue_Size : Positive := 5);\n Parameters\n Socket\n-Queue Size\n \n in\n-in\n \n [Sockets.Listen]\n \n Initialized and bound socket object\n+\n+\fChapter 4: Sockets package\n+\n+Queue Size\n+\n+13\n+\n+in\n+\n Requested slots in the listen queue\n \n Description\n This procedure establishes a listen queue after a TCP socket as been initialized\n and bound. Each slot in the queue can hold one incoming connection that has\n not been accepted yet. Note that most operating systems ignore queue sizes\n larger than five.\n See also [Accept Socket (procedure)], page 7,\n-[Bind (procedure)], page 7,\n+[Bind (procedure)], page 8,\n [Socket (procedure)], page 17.\n \n-\fChapter 4: Sockets package\n-\n-13\n-\n New Line (procedure)\n Purpose\n \n Send a CR/LF to a remote host\n \n Prototype\n \n@@ -667,15 +679,15 @@\n This procedure sends one or more CR/LF combinations to the peer.\n Exceptions\n Connection_Closed\n \n Peer has prematurely closed the connection\n \n See also [Put (procedure)], page 13,\n-[Put Line (procedure)], page 13.\n+[Put Line (procedure)], page 14.\n \n Put (procedure)\n Purpose\n \n Send a string to a remote host\n \n Prototype\n@@ -698,16 +710,20 @@\n This procedure sends the content of Str over an outgoing or incoming socket.\n Exceptions\n Connection_Closed\n \n Peer has prematurely closed the connection\n \n See also [New Line (procedure)], page 13,\n-[Put Line (procedure)], page 13,\n-[Send (procedure)], page 15.\n+[Put Line (procedure)], page 14,\n+[Send (procedure)], page 16.\n+\n+\f14\n+\n+AdaSockets reference manual\n \n Put Line (procedure)\n Purpose\n \n Send a CR/LF terminated string to a remote host\n \n Prototype\n@@ -722,29 +738,25 @@\n in\n \n [Sockets.Put Line]\n \n Initialized and connected socket object\n String to send\n \n-\f14\n-\n-AdaSockets reference manual\n-\n Description\n This procedure sends the content of Str plus a CR/LF combination over an\n outgoing or incoming socket.\n Exceptions\n Connection_Closed\n \n Peer has prematurely closed the connection\n \n See also [New Line (procedure)], page 13,\n [Put (procedure)], page 13,\n-[Send (procedure)], page 15.\n+[Send (procedure)], page 16.\n \n Receive (function)\n Purpose\n \n Receive raw data over a socket\n \n Prototype\n@@ -770,19 +782,23 @@\n socket. Only one system call will be performed; this function will return whatever data has arrived. Note that in GNAT the secondary stack may be used to\n store the data and may result in stack storage exhaustion.\n Exceptions\n Connection_Closed\n \n Peer has closed the connection before sending any data\n \n-See also [Receive (procedure)], page 14,\n+See also [Receive (procedure)], page 15,\n [Receive Some (procedure)], page 15,\n [Get Line (function)], page 10,\n [Get Line (procedure)], page 10.\n \n+\fChapter 4: Sockets package\n+\n+15\n+\n Receive (procedure)\n Purpose\n \n Receive raw data over a socket\n \n Prototype\n \n@@ -798,19 +814,14 @@\n \n Initialized and bound or connected socket object\n Incoming data buffer\n \n Description\n This procedure receives data from a bound UDP socket or a connected TCP\n socket. It will block until the Data reception buffer has been totally filled.\n-\n-\fChapter 4: Sockets package\n-\n-15\n-\n Exceptions\n Connection_Closed\n \n Peer has closed the connection before Data\u2019Length bytes\n were received\n \n See also [Get Line (function)], page 10,\n@@ -820,16 +831,17 @@\n \n Receive Some (procedure)\n Purpose\n \n Receive raw data over a socket\n \n Prototype\n-[Sockets.Receive Some]\n+\n procedure Receive_Some\n+[Sockets.Receive Some]\n (Socket : Socket FD\u2019Class;\n Data : out Ada.Streams.Stream Element Array;\n Last : out Ada.Streams.Stream Element Offset);\n Parameters\n Socket\n Data\n Last\n@@ -850,15 +862,19 @@\n Connection_Closed\n \n Peer has closed the connection before sending any data\n \n See also [Get Line (function)], page 10,\n [Get Line (procedure)], page 10,\n [Receive (function)], page 14,\n-[Receive (procedure)], page 14.\n+[Receive (procedure)], page 15.\n+\n+\f16\n+\n+AdaSockets reference manual\n \n Send (procedure)\n Purpose\n \n Send raw data over a socket\n \n Prototype\n@@ -875,26 +891,21 @@\n \n Initialized and connected socket object\n Data to be sent\n \n Description\n This procedure sends data over a connected outgoing socket or over an incoming\n socket.\n-\n-\f16\n-\n-AdaSockets reference manual\n-\n Exceptions\n Connection_Closed\n \n Peer has prematurely closed the connection\n \n See also [Put (procedure)], page 13,\n-[Put Line (procedure)], page 13.\n+[Put Line (procedure)], page 14.\n \n Set Buffer (procedure)\n Purpose\n \n Install a line-oriented buffer of the socket object\n \n Prototype\n@@ -923,14 +934,18 @@\n See also [Unset Buffer (procedure)], page 18.\n \n Setsockopt (procedure)\n Purpose\n \n Set a socket option\n \n+\fChapter 4: Sockets package\n+\n+17\n+\n Prototype\n \n procedure Setsockopt (Socket : Socket FD;\n [Sockets.Setsockopt]\n Level : Socket Level := SOL SOCKET;\n Optname : Socket Option; Optval : Integer);\n Parameters\n@@ -951,19 +966,14 @@\n \n Description\n This procedure sets options applicable to a socket. Please see your operating\n system manual for usable levels and options.\n Two levels are defined: SOL_SOCKET (the default) and IPPROTO_IP. The options\n are SO_REUSEADDR, SO_REUSEPORT, IP_MULTICAST_TTL, IP_ADD_MEMBERSHIP,\n IP_DROP_MEMBERSHIP, IP_MULTICAST_LOOP, SO_SNDBUF and IP_RCVBUF.\n-\n-\fChapter 4: Sockets package\n-\n-17\n-\n Note that unlike their C language counterpart, Getsockopt and Setsockopt\n do not require an extra parameter representing the length in bytes of the option\n value. AdaSockets knows the right size for every option.\n See also [Getsockopt (procedure)], page 12.\n \n Shutdown (procedure)\n Purpose\n@@ -1005,39 +1015,38 @@\n Domain\n Typ\n \n out\n in\n in\n \n-[Sockets.Socket]\n-\n Socket object to initialize\n Protocol family\n Kind of sockets\n \n+[Sockets.Socket]\n+\n+\f18\n+\n+AdaSockets reference manual\n+\n Description\n This procedure initializes a new socket object by reserving a file descriptor to\n the operating system. For backward compatibility with older versions of this\n library, AF_INET is still accepted as a value but should be replaced as soon as\n possible with the proper PF_INET. Using SOCK_STREAM for the Typ argument\n will create a TCP socket while a SOCK_DGRAM will create a UDP one.\n Example\n declare\n Sock : Socket_FD;\n begin\n -- Create a TCP socket\n Socket (Sock, PF_INET, SOCK_STREAM);\n -- Perform some operations on socket\n [...]\n-\n-\f18\n-\n-AdaSockets reference manual\n-\n -- Shutdown the socket in both directions\n Shutdown (Sock, Both);\n end;\n See also [Shutdown (procedure)], page 17.\n \n Unset Buffer (procedure)\n Purpose\n@@ -1115,38 +1124,29 @@\n IP multicast routers do implement threshold-based filtering and will not let IP\n multicast packets leave your organization if the TTL on the last router is smaller\n than 16.\n If 0 is given for the Port, a local one will be chosen. It can then later be retrieved\n using Get Sock Port.\n Example\n declare\n-Sock\n-: Socket_FD;\n-Incoming : Socket_FD;\n+Sock : Multicast_Socket_FD;\n begin\n--- Create a TCP socket listening on local port 4161\n-Socket (Sock, PF_INET, SOCK_STREAM);\n-Bind (Sock, 4161);\n-Listen (Sock, 3);\n+-- Create a multicast socket on group 224.1.2.3 port 8763\n+Sock := Create_Multicast_Socket (\"224.1.2.3\", 8763);\n+-- Perform some operations on socket\n+[...]\n+-- Shutdown the socket in both directions\n \n \f20\n \n AdaSockets reference manual\n \n--- One-connection-at-a-time server (3 may be pending)\n-loop\n--- Wait for a new connection and accept it\n-Accept_Socket (Sock, Incoming);\n--- Do some dialog with the remote host\n-Do_Some_Dialog (Incoming);\n--- Close incoming socket and wait for next connection\n-Shutdown (Incoming);\n-end loop;\n+Shutdown (Sock, Both);\n end;\n-See also [Send (procedure)], page 15,\n+See also [Send (procedure)], page 16,\n [Shutdown (procedure)], page 17.\n \n Create Multicast Socket (function)\n Purpose\n \n Create an IP multicast socket\n \n@@ -1188,26 +1188,21 @@\n declare\n Sock : Multicast_Socket_FD;\n begin\n -- Create a multicast socket on group 224.1.2.3 port 8763\n Sock := Create_Multicast_Socket (\"224.1.2.3\", 8763);\n -- Perform some operations on socket\n [...]\n-\n-\fChapter 5: Sockets.Multicast package\n-\n -- Shutdown the socket in both directions\n Shutdown (Sock, Both);\n end;\n-See also [Send (procedure)], page 15,\n+See also [Send (procedure)], page 16,\n [Shutdown (procedure)], page 17.\n \n-21\n-\n-\f\f23\n+\f21\n \n 6 Sockets.Naming package\n The Sockets.Naming package contains types and helper functions needed to manipulate\n Internet host names and addresses.\n \n type Address is record\n H1, H2, H3, H4 : Address Component;\n@@ -1276,17 +1271,17 @@\n Return value\n IPv4 address\n Exceptions\n Naming_Error\n \n No information available for this name or address\n \n-See also [Name Of (function)], page 26.\n+See also [Name Of (function)], page 24.\n \n-\f24\n+\f22\n \n AdaSockets reference manual\n \n Any Address (function)\n Purpose\n \n Special address representing any address on the local host\n@@ -1315,16 +1310,16 @@\n \n [Sockets.Naming.Get Peer Addr]\n \n Connected socket object\n \n Return value\n Peer address\n-See also [Get Peer Port (function)], page 24,\n-[Get Sock Addr (function)], page 24.\n+See also [Get Peer Port (function)], page 22,\n+[Get Sock Addr (function)], page 22.\n \n Get Peer Port (function)\n Purpose\n \n Retrieve port used by remote host\n \n Prototype\n@@ -1339,16 +1334,16 @@\n \n [Sockets.Naming.Get Peer Port]\n \n Connected socket object\n \n Return value\n Port used on the remote host\n-See also [Get Sock Port (function)], page 25,\n-[Get Peer Addr (function)], page 24.\n+See also [Get Sock Port (function)], page 23,\n+[Get Peer Addr (function)], page 22.\n \n Get Sock Addr (function)\n Purpose\n \n Retrieve IP address of local host\n \n Prototype\n@@ -1363,20 +1358,20 @@\n \n [Sockets.Naming.Get Sock Addr]\n \n Connected socket object\n \n \fChapter 6: Sockets.Naming package\n \n-25\n+23\n \n Return value\n Address of local interface used\n-See also [Get Sock Port (function)], page 25,\n-[Get Peer Addr (function)], page 24.\n+See also [Get Sock Port (function)], page 23,\n+[Get Peer Addr (function)], page 22.\n \n Get Sock Port (function)\n Purpose\n \n Retrieve port used by local host\n \n Prototype\n@@ -1391,16 +1386,16 @@\n \n [Sockets.Naming.Get Sock Port]\n \n Connected socket object\n \n Return value\n Port used on the local host\n-See also [Get Peer Port (function)], page 24,\n-[Get Sock Addr (function)], page 24.\n+See also [Get Peer Port (function)], page 22,\n+[Get Sock Addr (function)], page 22.\n \n Host Name (function)\n Purpose\n \n Get the name of the current host\n \n Prototype\n@@ -1428,19 +1423,19 @@\n \n in\n \n IP address\n \n Return value\n String representation of the IP address\n-See also [Value (function)], page 27.\n+See also [Value (function)], page 25.\n \n [Sockets.Naming.Image]\n \n-\f26\n+\f24\n \n AdaSockets reference manual\n \n Info Of Name Or IP (function)\n Purpose\n \n Get addresses and names of a host\n@@ -1511,19 +1506,19 @@\n Return value\n Name of the host\n Exceptions\n Naming_Error\n \n No information available for this name or address\n \n-See also [Address Of (function)], page 23.\n+See also [Address Of (function)], page 21.\n \n \fChapter 6: Sockets.Naming package\n \n-27\n+25\n \n Value (function)\n Purpose\n \n Transform a string into an address\n \n Prototype\n@@ -1533,21 +1528,21 @@\n Parameters\n Add\n \n in\n \n Return value\n Corresponding Address\n-See also [Image (function)], page 25.\n+See also [Image (function)], page 23.\n \n [Sockets.Naming.Value]\n \n Textual representation of an IP address\n \n-\f\f29\n+\f\f27\n \n Appendix A Contributors\n AdaSockets has been originally developped by Samuel Tardieu who still maintains it. However, the following people have made crucial contributions to AdaSockets, be they new code,\n bug fixes or porting to new operating systems:\n \u2022 Dmitriy Anisimkov (anisimkov@yahoo.com)\n \u2022 Alan Barnes (barnesa@aston.ac.uk)\n \u2022 Juanma Barranquero (lektu@terra.es)\n@@ -1564,94 +1559,94 @@\n \u2022 Thomas Quinot (thomas@cuivre.fr.eu.org)\n \u2022 Preben Randhol (randhol@pvv.org)\n \u2022 Maxim Reznik (max1@mbank.com.ua)\n \u2022 Joel Sherrill (joel.sherrill@oarcorp.com)\n \u2022 Samuel Tardieu (sam@rfc1149.net)\n If you feel that you have been forgotten, please send me a mail so that I can fix it in the\n next version.\n-See Appendix B [Resources on the Internet], page 31, for how to contribute.\n+See Appendix B [Resources on the Internet], page 29, for how to contribute.\n \n-\f\f31\n+\f\f29\n \n Appendix B Resources on the Internet\n The latest version of AdaSockets can always be found at:\n https://www.rfc1149.net/devel/adasockets\n You can report issues or the AdaSockets mailing-list at\n https://lists.sr.ht/~rfc1149/adasockets-devel\n Contributions and patches are welcomed.\n \n-\f\f33\n+\f\f31\n \n Index\n A\n \n G\n \n Accept_Socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7\n Accepting a new connection . . . . . . . . . . . . . . . . . . . . . 7\n-Ada.Streams.Stream_Element_Array . . . . 6, 14, 15\n+Ada.Streams.Stream_Element_Array . . 6, 14, 15, 16\n Ada.Streams.Stream_Element_Count . . . . . . . 14, 15\n AdaSockets presentation . . . . . . . . . . . . . . . . . . . . . . . . 1\n-Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n-Address_Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n-Address_Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n-Address_Of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n-AF_INET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n-Any_Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n-Assigning a local port . . . . . . . . . . . . . . . . . . . . . . . . . . . 7\n+Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21\n+Address_Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21\n+Address_Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21\n+Address_Of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21\n+AF_INET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18\n+Any_Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22\n+Assigning a local port . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n \n Get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9\n Get_Char . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9\n-Get_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10\n-Get_Peer_Addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n-Get_Peer_Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n+Get_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 11\n+Get_Peer_Addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22\n+Get_Peer_Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22\n Get_Receive_Queue_Size . . . . . . . . . . . . . . . . . . . . . . 11\n-Get_Send_Queue_Size. . . . . . . . . . . . . . . . . . . . . . . . . . 11\n-Get_Sock_Addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n-Get_Sock_Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25\n+Get_Send_Queue_Size. . . . . . . . . . . . . . . . . . . . . . . . . . 12\n+Get_Sock_Addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22\n+Get_Sock_Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n Getsockopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12\n Group communication . . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n \n H\n B\n Bind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n-Binding a socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7\n+Binding a socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Both . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n \n Handling a new connection . . . . . . . . . . . . . . . . . . . . . . 7\n-Host_Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n-Host_Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25\n+Host_Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21\n+Host_Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n \n I\n C\n Closing a socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n Comparaison with GNAT.Sockets . . . . . . . . . . . . . . . . 1\n Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Connecting a socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Connection_Closed . . . . . . . 9, 10, 11, 13, 14, 15, 16\n Connection_Refused . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n-Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29, 31\n+Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27, 29\n Create_Multicast_Socket . . . . . . . . . . . . . . . 5, 19, 20\n Creating a multicast socket . . . . . . . . . . . . . . 5, 19, 20\n-Creating a server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7\n+Creating a server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Creating a socket. . . . . . . . . . . . . . . . . . . . . 5, 17, 19, 20\n Creating a TCP socket . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n Creating a UDP socket . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n Creating a unicast socket . . . . . . . . . . . . . . . . . . . . . . . . 5\n CR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 11, 13\n \n-Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25\n-Info_Of_Name_Or_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . 26\n+Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n+Info_Of_Name_Or_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n Installing AdaSockets . . . . . . . . . . . . . . . . . . . . . . . . . . . 3\n-IP_ADD_MEMBERSHIP . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-IP_DROP_MEMBERSHIP . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-IP_MULTICAST_LOOP . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-IP_MULTICAST_TTL . . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-IPPROTO_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-Is_IP_Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26\n+IP_ADD_MEMBERSHIP . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+IP_DROP_MEMBERSHIP . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+IP_MULTICAST_LOOP . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+IP_MULTICAST_TTL . . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+IPPROTO_IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+Is_IP_Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n \n L\n LF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 11, 13\n Listen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12\n Listen queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12\n \n M\n@@ -1663,115 +1658,115 @@\n Multicast sockets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n Multicast_Socket_FD . . . . . . . . . . . . . . . . . . . . . . . 5, 19\n \n F\n \n N\n \n-Finding AdaSockets on the Internet . . . . . . . . . . . . 31\n+Finding AdaSockets on the Internet . . . . . . . . . . . . 29\n \n-Name_Of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26\n-Naming_Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23, 26\n+Name_Of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24\n+Naming_Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 24\n New_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n \n-\f34\n+\f32\n \n AdaSockets reference manual\n \n P\n \n Sockets.Multicast.Create_\n Multicast_Socket . . . . . . . . . . . . . . . . . . . . . 5, 19, 20\n-Sockets.Naming.Address_Of . . . . . . . . . . . . . . . . . . . 23\n-Sockets.Naming.Any_Address. . . . . . . . . . . . . . . . . . 24\n-Sockets.Naming.Get_Peer_Addr . . . . . . . . . . . . . . . 24\n-Sockets.Naming.Get_Peer_Port . . . . . . . . . . . . . . . 24\n-Sockets.Naming.Get_Sock_Addr . . . . . . . . . . . . . . . 24\n-Sockets.Naming.Get_Sock_Port . . . . . . . . . . . . . . . 25\n-Sockets.Naming.Host_Name . . . . . . . . . . . . . . . . . . . . 25\n-Sockets.Naming.Image . . . . . . . . . . . . . . . . . . . . . . . . 25\n-Sockets.Naming.Info_Of_Name_Or_IP . . . . . . . . . 26\n-Sockets.Naming.Is_IP_Address . . . . . . . . . . . . . . . 26\n-Sockets.Naming.Name_Of . . . . . . . . . . . . . . . . . . . . . . 26\n-Sockets.Naming.Value . . . . . . . . . . . . . . . . . . . . . . . . 27\n+Sockets.Naming.Address_Of . . . . . . . . . . . . . . . . . . . 21\n+Sockets.Naming.Any_Address. . . . . . . . . . . . . . . . . . 22\n+Sockets.Naming.Get_Peer_Addr . . . . . . . . . . . . . . . 22\n+Sockets.Naming.Get_Peer_Port . . . . . . . . . . . . . . . 22\n+Sockets.Naming.Get_Sock_Addr . . . . . . . . . . . . . . . 22\n+Sockets.Naming.Get_Sock_Port . . . . . . . . . . . . . . . 23\n+Sockets.Naming.Host_Name . . . . . . . . . . . . . . . . . . . . 23\n+Sockets.Naming.Image . . . . . . . . . . . . . . . . . . . . . . . . 23\n+Sockets.Naming.Info_Of_Name_Or_IP . . . . . . . . . 24\n+Sockets.Naming.Is_IP_Address . . . . . . . . . . . . . . . 24\n+Sockets.Naming.Name_Of . . . . . . . . . . . . . . . . . . . . . . 24\n+Sockets.Naming.Value . . . . . . . . . . . . . . . . . . . . . . . . 25\n Sockets.New_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n Sockets.Put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n-Sockets.Put_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n-Sockets.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14\n+Sockets.Put_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14\n+Sockets.Receive. . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 15\n Sockets.Receive_Some . . . . . . . . . . . . . . . . . . . . . . . . 15\n-Sockets.Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15\n+Sockets.Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n Sockets.Set_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n-Sockets.Setsockopt . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n+Sockets.Setsockopt . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n Sockets.Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n-Sockets.SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-Sockets.SO_REUSEADDR . . . . . . . . . . . . . . . . . . . . . 12, 16\n-Sockets.SO_REUSEPORT . . . . . . . . . . . . . . . . . . . . . 12, 16\n-Sockets.SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n+Sockets.SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+Sockets.SO_REUSEADDR . . . . . . . . . . . . . . . . . . . . . 12, 17\n+Sockets.SO_REUSEPORT . . . . . . . . . . . . . . . . . . . . . 12, 17\n+Sockets.SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n Sockets.Socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 17\n-Sockets.SOL_SOCKET . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n+Sockets.SOL_SOCKET . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n Sockets.Unset_Buffer . . . . . . . . . . . . . . . . . . . . . . . . 18\n-SOL_SOCKET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-Stream_Element_Array . . . . . . . . . . . . . . . . . . 6, 14, 15\n+SOL_SOCKET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+Stream_Element_Array . . . . . . . . . . . . . . . 6, 14, 15, 16\n Stream_Element_Count . . . . . . . . . . . . . . . . . . . . . 14, 15\n-String_Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n-String_Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n-Suggesting a feature . . . . . . . . . . . . . . . . . . . . . . . . . . . 31\n+String_Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21\n+String_Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21\n+Suggesting a feature . . . . . . . . . . . . . . . . . . . . . . . . . . . 29\n \n-PF_INET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n+PF_INET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18\n Put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n-Put_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13\n+Put_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14\n \n R\n Raw data manipulation . . . . . . . . . . . . . . . . . . . . . . . . . 6\n-Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 17\n+Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 15, 17\n Receive_Some . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15\n Receiving data . . . . . . . . . . 6, 9, 10, 11, 14, 15, 16, 18\n-Reporting a bug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31\n-Representing IP addresses . . . . . . . . . . . . . . . . . . 25, 27\n+Reporting a bug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29\n+Representing IP addresses . . . . . . . . . . . . . . . . . . 23, 25\n Retrieving socket options. . . . . . . . . . . . . . . . . . . . . . . 12\n \n S\n-Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 17\n-Sending data . . . . . . . . . . . . . . . . . . . . . . . . . 6, 11, 13, 15\n-Sending patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31\n+Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16, 17\n+Sending data . . . . . . . . . . . . . . . . . . . . . 6, 11, 13, 14, 16\n+Sending patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29\n Set_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n-Setsockopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n+Setsockopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n Setting socket options . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n-SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-SO_REUSEADDR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-SO_REUSEPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n-SOCK_DGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n-SOCK_STREAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n+SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+SO_REUSEADDR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+SO_REUSEPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n+SOCK_DGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18\n+SOCK_STREAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18\n Socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 17\n Socket shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n Socket_Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Socket_FD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 7\n Sockets.Accept_Socket . . . . . . . . . . . . . . . . . . . . . . . . 7\n Sockets.Bind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Sockets.Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8\n Sockets.Get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9\n Sockets.Get_Char . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9\n-Sockets.Get_Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10\n+Sockets.Get_Line . . . . . . . . . . . . . . . . . . . . . . . . . 10, 11\n Sockets.Get_Receive_Queue_Size . . . . . . . . . . . . . 11\n-Sockets.Get_Send_Queue_Size . . . . . . . . . . . . . . . . 11\n+Sockets.Get_Send_Queue_Size . . . . . . . . . . . . . . . . 12\n Sockets.Getsockopt . . . . . . . . . . . . . . . . . . . . . . . . . . . 12\n-Sockets.IP_ADD_MEMBERSHIP . . . . . . . . . . . . . . . 12, 16\n-Sockets.IP_DROP_MEMBERSHIP . . . . . . . . . . . . . . 12, 16\n-Sockets.IP_MULTICAST_LOOP . . . . . . . . . . . . . . . 12, 16\n-Sockets.IP_MULTICAST_TTL . . . . . . . . . . . . . . . . 12, 16\n-Sockets.IPPROTO_IP . . . . . . . . . . . . . . . . . . . . . . . 12, 16\n+Sockets.IP_ADD_MEMBERSHIP . . . . . . . . . . . . . . . 12, 17\n+Sockets.IP_DROP_MEMBERSHIP . . . . . . . . . . . . . . 12, 17\n+Sockets.IP_MULTICAST_LOOP . . . . . . . . . . . . . . . 12, 17\n+Sockets.IP_MULTICAST_TTL . . . . . . . . . . . . . . . . 12, 17\n+Sockets.IPPROTO_IP . . . . . . . . . . . . . . . . . . . . . . . 12, 17\n Sockets.Listen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12\n \n T\n TCP socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n \n U\n UDP socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n Unicast sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n Unset_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18\n \n V\n-Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27\n+Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25\n \n \f\n"}]}]}, {"source1": "./usr/share/info/adasockets.info.gz", "source2": "./usr/share/info/adasockets.info.gz", "unified_diff": null, "details": [{"source1": "adasockets.info", "source2": "adasockets.info", "has_internal_linenos": true, "unified_diff": "@@ -750,1710 +750,1710 @@\n 00002ed0: 6b65 74e2 8099 2077 696c 6c20 626c 6f63 ket... will bloc\n 00002ee0: 6b20 756e 7469 6c20 616e 2069 6e63 6f6d k until an incom\n 00002ef0: 696e 6720 636f 6e6e 6563 7469 6f6e 2069 ing connection i\n 00002f00: 7320 7265 6164 7920 746f 0a20 2020 2020 s ready to. \n 00002f10: 6265 2061 6363 6570 7465 642e 0a0a 4558 be accepted...EX\n 00002f20: 414d 504c 450a 2020 2020 2020 2020 2020 AMPLE. \n 00002f30: 6465 636c 6172 650a 2020 2020 2020 2020 declare. \n-00002f40: 2020 2020 2053 6f63 6b20 3a20 4d75 6c74 Sock : Mult\n-00002f50: 6963 6173 745f 536f 636b 6574 5f46 443b icast_Socket_FD;\n-00002f60: 0a20 2020 2020 2020 2020 2062 6567 696e . begin\n-00002f70: 0a20 2020 2020 2020 2020 2020 2020 2d2d . --\n-00002f80: 2043 7265 6174 6520 6120 6d75 6c74 6963 Create a multic\n-00002f90: 6173 7420 736f 636b 6574 206f 6e20 6772 ast socket on gr\n-00002fa0: 6f75 7020 3232 342e 312e 322e 3320 706f oup 224.1.2.3 po\n-00002fb0: 7274 2038 3736 330a 2020 2020 2020 2020 rt 8763. \n-00002fc0: 2020 2020 2053 6f63 6b20 3a3d 2043 7265 Sock := Cre\n-00002fd0: 6174 655f 4d75 6c74 6963 6173 745f 536f ate_Multicast_So\n-00002fe0: 636b 6574 2028 2232 3234 2e31 2e32 2e33 cket (\"224.1.2.3\n-00002ff0: 222c 2038 3736 3329 3b0a 2020 2020 2020 \", 8763);. \n-00003000: 2020 2020 2020 202d 2d20 5065 7266 6f72 -- Perfor\n-00003010: 6d20 736f 6d65 206f 7065 7261 7469 6f6e m some operation\n-00003020: 7320 6f6e 2073 6f63 6b65 740a 2020 2020 s on socket. \n-00003030: 2020 2020 2020 2020 205b 2e2e 2e5d 0a20 [...]. \n-00003040: 2020 2020 2020 2020 2020 2020 2d2d 2053 -- S\n-00003050: 6875 7464 6f77 6e20 7468 6520 736f 636b hutdown the sock\n-00003060: 6574 2069 6e20 626f 7468 2064 6972 6563 et in both direc\n-00003070: 7469 6f6e 730a 2020 2020 2020 2020 2020 tions. \n-00003080: 2020 2053 6875 7464 6f77 6e20 2853 6f63 Shutdown (Soc\n-00003090: 6b2c 2042 6f74 6829 3b0a 2020 2020 2020 k, Both);. \n-000030a0: 2020 2020 656e 643b 0a0a 5345 4520 414c end;..SEE AL\n-000030b0: 534f 0a20 2020 2020 2a6e 6f74 6520 4269 SO. *note Bi\n-000030c0: 6e64 2028 7072 6f63 6564 7572 6529 3a3a nd (procedure)::\n-000030d0: 2c0a 2020 2020 202a 6e6f 7465 204c 6973 ,. *note Lis\n-000030e0: 7465 6e20 2870 726f 6365 6475 7265 293a ten (procedure):\n-000030f0: 3a2c 0a20 2020 2020 2a6e 6f74 6520 5368 :,. *note Sh\n-00003100: 7574 646f 776e 2028 7072 6f63 6564 7572 utdown (procedur\n-00003110: 6529 3a3a 2c0a 2020 2020 202a 6e6f 7465 e)::,. *note\n-00003120: 2053 6f63 6b65 7420 2870 726f 6365 6475 Socket (procedu\n-00003130: 7265 293a 3a2e 0a0a 2a20 4d65 6e75 3a0a re)::...* Menu:.\n-00003140: 0a2a 2042 696e 6420 2870 726f 6365 6475 .* Bind (procedu\n-00003150: 7265 293a 3a0a 2a20 436f 6e6e 6563 7420 re)::.* Connect \n-00003160: 2870 726f 6365 6475 7265 293a 3a0a 2a20 (procedure)::.* \n-00003170: 4765 7420 2866 756e 6374 696f 6e29 3a3a Get (function)::\n-00003180: 0a2a 2047 6574 5f43 6861 7220 2866 756e .* Get_Char (fun\n-00003190: 6374 696f 6e29 3a3a 0a2a 2047 6574 5f4c ction)::.* Get_L\n-000031a0: 696e 6520 2866 756e 6374 696f 6e29 3a3a ine (function)::\n-000031b0: 0a2a 2047 6574 5f4c 696e 6520 2870 726f .* Get_Line (pro\n-000031c0: 6365 6475 7265 293a 3a0a 2a20 4765 745f cedure)::.* Get_\n-000031d0: 5265 6365 6976 655f 5175 6575 655f 5369 Receive_Queue_Si\n-000031e0: 7a65 2028 6675 6e63 7469 6f6e 293a 3a0a ze (function)::.\n-000031f0: 2a20 4765 745f 5365 6e64 5f51 7565 7565 * Get_Send_Queue\n-00003200: 5f53 697a 6520 2866 756e 6374 696f 6e29 _Size (function)\n-00003210: 3a3a 0a2a 2047 6574 736f 636b 6f70 7420 ::.* Getsockopt \n-00003220: 2870 726f 6365 6475 7265 293a 3a0a 2a20 (procedure)::.* \n-00003230: 4c69 7374 656e 2028 7072 6f63 6564 7572 Listen (procedur\n-00003240: 6529 3a3a 0a2a 204e 6577 5f4c 696e 6520 e)::.* New_Line \n-00003250: 2870 726f 6365 6475 7265 293a 3a0a 2a20 (procedure)::.* \n-00003260: 5075 7420 2870 726f 6365 6475 7265 293a Put (procedure):\n-00003270: 3a0a 2a20 5075 745f 4c69 6e65 2028 7072 :.* Put_Line (pr\n-00003280: 6f63 6564 7572 6529 3a3a 0a2a 2052 6563 ocedure)::.* Rec\n-00003290: 6569 7665 2028 6675 6e63 7469 6f6e 293a eive (function):\n-000032a0: 3a0a 2a20 5265 6365 6976 6520 2870 726f :.* Receive (pro\n-000032b0: 6365 6475 7265 293a 3a0a 2a20 5265 6365 cedure)::.* Rece\n-000032c0: 6976 655f 536f 6d65 2028 7072 6f63 6564 ive_Some (proced\n-000032d0: 7572 6529 3a3a 0a2a 2053 656e 6420 2870 ure)::.* Send (p\n-000032e0: 726f 6365 6475 7265 293a 3a0a 2a20 5365 rocedure)::.* Se\n-000032f0: 745f 4275 6666 6572 2028 7072 6f63 6564 t_Buffer (proced\n-00003300: 7572 6529 3a3a 0a2a 2053 6574 736f 636b ure)::.* Setsock\n-00003310: 6f70 7420 2870 726f 6365 6475 7265 293a opt (procedure):\n-00003320: 3a0a 2a20 5368 7574 646f 776e 2028 7072 :.* Shutdown (pr\n-00003330: 6f63 6564 7572 6529 3a3a 0a2a 2053 6f63 ocedure)::.* Soc\n-00003340: 6b65 7420 2870 726f 6365 6475 7265 293a ket (procedure):\n-00003350: 3a0a 2a20 556e 7365 745f 4275 6666 6572 :.* Unset_Buffer\n-00003360: 2028 7072 6f63 6564 7572 6529 3a3a 0a0a (procedure)::..\n-00003370: 1f0a 4669 6c65 3a20 6164 6173 6f63 6b65 ..File: adasocke\n-00003380: 7473 2e69 6e66 6f2c 2020 4e6f 6465 3a20 ts.info, Node: \n-00003390: 4269 6e64 2028 7072 6f63 6564 7572 6529 Bind (procedure)\n-000033a0: 2c20 204e 6578 743a 2043 6f6e 6e65 6374 , Next: Connect\n-000033b0: 2028 7072 6f63 6564 7572 6529 2c20 2050 (procedure), P\n-000033c0: 7265 763a 2041 6363 6570 745f 536f 636b rev: Accept_Sock\n-000033d0: 6574 2028 7072 6f63 6564 7572 6529 2c20 et (procedure), \n-000033e0: 2055 703a 2041 6363 6570 745f 536f 636b Up: Accept_Sock\n-000033f0: 6574 2028 7072 6f63 6564 7572 6529 0a0a et (procedure)..\n-00003400: 4269 6e64 2028 7072 6f63 6564 7572 6529 Bind (procedure)\n-00003410: 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d .---------------\n-00003420: 2d0a 0a50 5552 504f 5345 0a20 2020 2020 -..PURPOSE. \n-00003430: 4173 736f 6369 6174 6520 6120 6c6f 6361 Associate a loca\n-00003440: 6c20 706f 7274 2074 6f20 6120 736f 636b l port to a sock\n-00003450: 6574 0a50 524f 544f 5459 5045 0a20 2020 et.PROTOTYPE. \n-00003460: 2020 202d 2d20 536f 636b 6574 732e 4269 -- Sockets.Bi\n-00003470: 6e64 3a20 7072 6f63 6564 7572 6520 4269 nd: procedure Bi\n-00003480: 6e64 2028 534f 434b 4554 203a 2053 6f63 nd (SOCKET : Soc\n-00003490: 6b65 745f 4644 3b0a 2020 2020 2020 2020 ket_FD;. \n-000034a0: 2020 2020 2020 2050 4f52 5420 3a20 4e61 PORT : Na\n-000034b0: 7475 7261 6c3b 2048 4f53 5420 3a20 5374 tural; HOST : St\n-000034c0: 7269 6e67 203a 3d20 2222 293b 0a0a 5041 ring := \"\");..PA\n-000034d0: 5241 4d45 5445 5253 0a20 2020 2020 534f RAMETERS. SO\n-000034e0: 434b 4554 2020 2020 2069 6e20 2020 2020 CKET in \n-000034f0: 2020 2020 496e 6974 6961 6c69 7a65 6420 Initialized \n-00003500: 736f 636b 6574 206f 626a 6563 740a 2020 socket object. \n-00003510: 2020 2050 4f52 5420 2020 2020 2020 696e PORT in\n-00003520: 2020 2020 2020 2020 204c 6f63 616c 2070 Local p\n-00003530: 6f72 7420 746f 2062 696e 6420 746f 0a20 ort to bind to. \n-00003540: 2020 2020 484f 5354 2020 2020 2020 2069 HOST i\n-00003550: 6e20 2020 2020 2020 2020 4c6f 6361 6c20 n Local \n-00003560: 696e 7465 7266 6163 6520 746f 2062 696e interface to bin\n-00003570: 6420 746f 0a0a 4445 5343 5249 5054 494f d to..DESCRIPTIO\n-00003580: 4e0a 2020 2020 2054 6869 7320 7072 6f63 N. This proc\n-00003590: 6564 7572 6520 7265 7175 6573 7473 2061 edure requests a\n-000035a0: 206c 6f63 616c 2070 6f72 7420 6672 6f6d local port from\n-000035b0: 2074 6865 206f 7065 7261 7469 6e67 2073 the operating s\n-000035c0: 7973 7465 6d2e 2020 4966 0a20 2020 2020 ystem. If. \n-000035d0: 3020 6973 2067 6976 656e 2069 6e20 504f 0 is given in PO\n-000035e0: 5254 2c20 7468 6520 7379 7374 656d 2077 RT, the system w\n-000035f0: 696c 6c20 6173 7369 676e 2061 2066 7265 ill assign a fre\n-00003600: 6520 706f 7274 2077 686f 7365 206e 756d e port whose num\n-00003610: 6265 720a 2020 2020 2063 616e 206c 6174 ber. can lat\n-00003620: 6572 2062 6520 7265 7472 6965 7665 6420 er be retrieved \n-00003630: 7573 696e 6720 2a6e 6f74 6520 4765 745f using *note Get_\n-00003640: 536f 636b 5f50 6f72 7420 2866 756e 6374 Sock_Port (funct\n-00003650: 696f 6e29 3a3a 2e0a 2020 2020 2041 6c73 ion)::.. Als\n-00003660: 6f2c 206d 6f73 7420 6f70 6572 6174 696e o, most operatin\n-00003670: 6720 7379 7374 656d 7320 7265 7175 6972 g systems requir\n-00003680: 6520 7370 6563 6961 6c20 7072 6976 696c e special privil\n-00003690: 6567 6573 2069 6620 796f 7520 7761 6e74 eges if you want\n-000036a0: 0a20 2020 2020 746f 2062 696e 6420 746f . to bind to\n-000036b0: 2070 6f72 7473 2062 656c 6f77 2031 3032 ports below 102\n-000036c0: 342e 0a0a 2020 2020 2049 6620 484f 5354 4... If HOST\n-000036d0: 2069 7320 6e6f 7420 7468 6520 656d 7074 is not the empt\n-000036e0: 7920 7374 7269 6e67 2c20 6974 206d 7573 y string, it mus\n-000036f0: 7420 636f 6e74 6169 6e20 7468 6520 4950 t contain the IP\n-00003700: 2061 6464 7265 7373 206f 660a 2020 2020 address of. \n-00003710: 2061 206c 6f63 616c 2069 6e74 6572 6661 a local interfa\n-00003720: 6365 2074 6f20 6269 6e64 2074 6f2c 206f ce to bind to, o\n-00003730: 7220 6120 6e61 6d65 2077 6869 6368 2072 r a name which r\n-00003740: 6573 6f6c 7665 7320 696e 746f 2073 7563 esolves into suc\n-00003750: 6820 616e 0a20 2020 2020 6164 6472 6573 h an. addres\n-00003760: 732e 2020 4966 2061 6e20 656d 7074 7920 s. If an empty \n-00003770: 7374 7269 6e67 2069 7320 6769 7665 6e20 string is given \n-00003780: 2874 6865 2064 6566 6175 6c74 292c 2074 (the default), t\n-00003790: 6865 2073 6f63 6b65 740a 2020 2020 2077 he socket. w\n-000037a0: 696c 6c20 6265 2062 6f75 6e64 2074 6f20 ill be bound to \n-000037b0: 616c 6c20 7468 6520 6176 6169 6c61 626c all the availabl\n-000037c0: 6520 696e 7465 7266 6163 6573 2e0a 0a45 e interfaces...E\n-000037d0: 5843 4550 5449 4f4e 530a 2020 2020 20e2 XCEPTIONS. .\n-000037e0: 8098 536f 636b 6574 5f45 7272 6f72 e280 ..Socket_Error..\n-000037f0: 9920 2020 2020 5265 7175 6573 7465 6420 . Requested \n-00003800: 706f 7274 206f 7220 696e 7465 7266 6163 port or interfac\n-00003810: 6520 6e6f 7420 6176 6169 6c61 626c 650a e not available.\n-00003820: 0a53 4545 2041 4c53 4f0a 2020 2020 202a .SEE ALSO. *\n-00003830: 6e6f 7465 204c 6973 7465 6e20 2870 726f note Listen (pro\n-00003840: 6365 6475 7265 293a 3a2c 0a20 2020 2020 cedure)::,. \n-00003850: 2a6e 6f74 6520 536f 636b 6574 2028 7072 *note Socket (pr\n-00003860: 6f63 6564 7572 6529 3a3a 2e0a 0a1f 0a46 ocedure)::.....F\n-00003870: 696c 653a 2061 6461 736f 636b 6574 732e ile: adasockets.\n-00003880: 696e 666f 2c20 204e 6f64 653a 2043 6f6e info, Node: Con\n-00003890: 6e65 6374 2028 7072 6f63 6564 7572 6529 nect (procedure)\n-000038a0: 2c20 204e 6578 743a 2047 6574 2028 6675 , Next: Get (fu\n-000038b0: 6e63 7469 6f6e 292c 2020 5072 6576 3a20 nction), Prev: \n-000038c0: 4269 6e64 2028 7072 6f63 6564 7572 6529 Bind (procedure)\n-000038d0: 2c20 2055 703a 2041 6363 6570 745f 536f , Up: Accept_So\n-000038e0: 636b 6574 2028 7072 6f63 6564 7572 6529 cket (procedure)\n-000038f0: 0a0a 436f 6e6e 6563 7420 2870 726f 6365 ..Connect (proce\n-00003900: 6475 7265 290a 2d2d 2d2d 2d2d 2d2d 2d2d dure).----------\n-00003910: 2d2d 2d2d 2d2d 2d2d 2d0a 0a50 5552 504f ---------..PURPO\n-00003920: 5345 0a20 2020 2020 436f 6e6e 6563 7420 SE. Connect \n-00003930: 6120 736f 636b 6574 206f 6e20 6120 6769 a socket on a gi\n-00003940: 7665 6e20 686f 7374 2f70 6f72 740a 5052 ven host/port.PR\n-00003950: 4f54 4f54 5950 450a 2020 2020 2020 2d2d OTOTYPE. --\n-00003960: 2053 6f63 6b65 7473 2e43 6f6e 6e65 6374 Sockets.Connect\n-00003970: 3a20 7072 6f63 6564 7572 6520 436f 6e6e : procedure Conn\n-00003980: 6563 7420 2853 4f43 4b45 5420 3a20 536f ect (SOCKET : So\n-00003990: 636b 6574 5f46 443b 0a20 2020 2020 2020 cket_FD;. \n-000039a0: 2020 2020 2020 2020 484f 5354 203a 2053 HOST : S\n-000039b0: 7472 696e 673b 2050 4f52 5420 3a20 506f tring; PORT : Po\n-000039c0: 7369 7469 7665 293b 0a0a 5041 5241 4d45 sitive);..PARAME\n-000039d0: 5445 5253 0a20 2020 2020 534f 434b 4554 TERS. SOCKET\n-000039e0: 2020 2020 2069 6e20 2020 2020 2020 2020 in \n-000039f0: 496e 6974 6961 6c69 7a65 6420 736f 636b Initialized sock\n-00003a00: 6574 206f 626a 6563 740a 2020 2020 2048 et object. H\n-00003a10: 4f53 5420 2020 2020 2020 696e 2020 2020 OST in \n-00003a20: 2020 2020 2048 6f73 7420 746f 2063 6f6e Host to con\n-00003a30: 6e65 6374 2074 6f0a 2020 2020 2050 4f52 nect to. POR\n-00003a40: 5420 2020 2020 2020 696e 2020 2020 2020 T in \n-00003a50: 2020 2050 6f72 7420 746f 2063 6f6e 6e65 Port to conne\n-00003a60: 6374 2074 6f0a 0a44 4553 4352 4950 5449 ct to..DESCRIPTI\n-00003a70: 4f4e 0a20 2020 2020 5468 6973 2070 726f ON. This pro\n-00003a80: 6365 6475 7265 2063 6f6e 6e65 6374 7320 cedure connects \n-00003a90: 616e 2069 6e69 7469 616c 697a 6564 2073 an initialized s\n-00003aa0: 6f63 6b65 7420 746f 2061 2067 6976 656e ocket to a given\n-00003ab0: 2068 6f73 7420 6f6e 2061 0a20 2020 2020 host on a. \n-00003ac0: 6769 7665 6e20 706f 7274 2e20 2049 6e20 given port. In \n-00003ad0: 7468 6520 6361 7365 206f 6620 6120 5443 the case of a TC\n-00003ae0: 5020 736f 636b 6574 2c20 6120 7265 616c P socket, a real\n-00003af0: 2063 6f6e 6e65 6374 696f 6e20 6973 0a20 connection is. \n-00003b00: 2020 2020 6174 7465 6d70 7465 642e 2020 attempted. \n-00003b10: 496e 2074 6865 2063 6173 6520 6f66 2061 In the case of a\n-00003b20: 2055 4450 2073 6f63 6b65 742c 206e 6f20 UDP socket, no \n-00003b30: 636f 6e6e 6563 7469 6f6e 2074 616b 6573 connection takes\n-00003b40: 2070 6c61 6365 0a20 2020 2020 6275 7420 place. but \n-00003b50: 7468 6520 656e 6470 6f69 6e74 2063 6f6f the endpoint coo\n-00003b60: 7264 696e 6174 6573 2061 7265 2072 6563 rdinates are rec\n-00003b70: 6f72 6465 642e 0a0a 4558 4345 5054 494f orded...EXCEPTIO\n-00003b80: 4e53 0a20 2020 2020 e280 9843 6f6e 6e65 NS. ...Conne\n-00003b90: 6374 696f 6e5f 5265 6675 7365 64e2 8099 ction_Refused...\n-00003ba0: 5468 6520 636f 6e6e 6563 7469 6f6e 2068 The connection h\n-00003bb0: 6173 2062 6565 6e20 7265 6675 7365 6420 as been refused \n-00003bc0: 6279 2074 6865 0a20 2020 2020 2020 2020 by the. \n-00003bd0: 2020 2020 2020 2020 2020 2020 2020 2073 s\n-00003be0: 6572 7665 720a 2020 2020 20e2 8098 536f erver. ...So\n-00003bf0: 636b 6574 5f45 7272 6f72 e280 9920 2020 cket_Error... \n-00003c00: 2020 416e 6f74 6865 7220 6572 726f 7220 Another error \n-00003c10: 6f63 6375 7272 6564 2064 7572 696e 6720 occurred during \n-00003c20: 7468 650a 2020 2020 2020 2020 2020 2020 the. \n-00003c30: 2020 2020 2020 2020 2020 2020 636f 6e6e conn\n-00003c40: 6563 7469 6f6e 0a0a 4558 414d 504c 450a ection..EXAMPLE.\n-00003c50: 2020 2020 2020 2020 2020 6465 636c 6172 declar\n-00003c60: 650a 2020 2020 2020 2020 2020 2020 2053 e. S\n-00003c70: 6f63 6b20 3a20 536f 636b 6574 5f46 443b ock : Socket_FD;\n-00003c80: 0a20 2020 2020 2020 2020 2062 6567 696e . begin\n-00003c90: 0a20 2020 2020 2020 2020 2020 2020 2d2d . --\n-00003ca0: 2043 7265 6174 6520 6120 5443 5020 736f Create a TCP so\n-00003cb0: 636b 6574 0a20 2020 2020 2020 2020 2020 cket. \n-00003cc0: 2020 536f 636b 6574 2028 536f 636b 2c20 Socket (Sock, \n-00003cd0: 5046 5f49 4e45 542c 2053 4f43 4b5f 5354 PF_INET, SOCK_ST\n-00003ce0: 5245 414d 293b 0a20 2020 2020 2020 2020 REAM);. \n-00003cf0: 2020 2020 2d2d 2043 6f6e 6e65 6374 2069 -- Connect i\n-00003d00: 7420 746f 2072 6663 3131 3439 2e6e 6574 t to rfc1149.net\n-00003d10: 2773 206d 6169 6c20 7365 7276 6572 0a20 's mail server. \n-00003d20: 2020 2020 2020 2020 2020 2020 436f 6e6e Conn\n-00003d30: 6563 7420 2853 6f63 6b2c 2022 6d61 696c ect (Sock, \"mail\n-00003d40: 2e72 6663 3131 3439 2e6e 6574 222c 2032 .rfc1149.net\", 2\n-00003d50: 3529 3b0a 2020 2020 2020 2020 2020 2020 5);. \n-00003d60: 202d 2d20 446f 2061 206d 6169 6c20 7472 -- Do a mail tr\n-00003d70: 616e 7361 6374 696f 6e20 7468 656e 2063 ansaction then c\n-00003d80: 6c6f 7365 2074 6865 2073 6f63 6b65 740a lose the socket.\n-00003d90: 2020 2020 2020 2020 2020 2020 205b 2e2e [..\n-00003da0: 2e5d 0a20 2020 2020 2020 2020 2065 6e64 .]. end\n-00003db0: 3b0a 0a53 4545 2041 4c53 4f0a 2020 2020 ;..SEE ALSO. \n-00003dc0: 202a 6e6f 7465 2053 6f63 6b65 7420 2870 *note Socket (p\n-00003dd0: 726f 6365 6475 7265 293a 3a2e 0a0a 1f0a rocedure)::.....\n-00003de0: 4669 6c65 3a20 6164 6173 6f63 6b65 7473 File: adasockets\n-00003df0: 2e69 6e66 6f2c 2020 4e6f 6465 3a20 4765 .info, Node: Ge\n-00003e00: 7420 2866 756e 6374 696f 6e29 2c20 204e t (function), N\n-00003e10: 6578 743a 2047 6574 5f43 6861 7220 2866 ext: Get_Char (f\n-00003e20: 756e 6374 696f 6e29 2c20 2050 7265 763a unction), Prev:\n-00003e30: 2043 6f6e 6e65 6374 2028 7072 6f63 6564 Connect (proced\n-00003e40: 7572 6529 2c20 2055 703a 2041 6363 6570 ure), Up: Accep\n-00003e50: 745f 536f 636b 6574 2028 7072 6f63 6564 t_Socket (proced\n-00003e60: 7572 6529 0a0a 4765 7420 2866 756e 6374 ure)..Get (funct\n-00003e70: 696f 6e29 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d ion).-----------\n-00003e80: 2d2d 2d0a 0a50 5552 504f 5345 0a20 2020 ---..PURPOSE. \n-00003e90: 2020 4765 7420 6120 7374 7269 6e67 2066 Get a string f\n-00003ea0: 726f 6d20 6120 7265 6d6f 7465 2068 6f73 rom a remote hos\n-00003eb0: 740a 5052 4f54 4f54 5950 450a 2020 2020 t.PROTOTYPE. \n-00003ec0: 2020 2d2d 2053 6f63 6b65 7473 2e47 6574 -- Sockets.Get\n-00003ed0: 3a20 6675 6e63 7469 6f6e 2047 6574 2028 : function Get (\n-00003ee0: 534f 434b 4554 203a 2053 6f63 6b65 745f SOCKET : Socket_\n-00003ef0: 4644 2743 6c61 7373 290a 2020 2020 2020 FD'Class). \n-00003f00: 2020 2020 2020 2020 2072 6574 7572 6e20 return \n-00003f10: 5374 7269 6e67 3b0a 0a50 4152 414d 4554 String;..PARAMET\n-00003f20: 4552 530a 2020 2020 2053 4f43 4b45 5420 ERS. SOCKET \n-00003f30: 2020 2020 696e 2020 2020 2020 2020 2049 in I\n-00003f40: 6e69 7469 616c 697a 6564 2061 6e64 2063 nitialized and c\n-00003f50: 6f6e 6e65 6374 6564 2073 6f63 6b65 7420 onnected socket \n-00003f60: 6f62 6a65 6374 0a0a 5245 5455 524e 2056 object..RETURN V\n-00003f70: 414c 5545 0a20 2020 2020 536f 6d65 2063 ALUE. Some c\n-00003f80: 6861 7261 6374 6572 7320 7468 6174 2068 haracters that h\n-00003f90: 6176 6520 6265 656e 2072 6563 6569 7665 ave been receive\n-00003fa0: 640a 0a44 4553 4352 4950 5449 4f4e 0a20 d..DESCRIPTION. \n-00003fb0: 2020 2020 5468 6973 2066 756e 6374 696f This functio\n-00003fc0: 6e20 7265 6365 6976 6573 2073 6f6d 6520 n receives some \n-00003fd0: 6368 6172 6163 7465 7273 2066 726f 6d20 characters from \n-00003fe0: 6120 7265 6d6f 7465 2068 6f73 742e 2020 a remote host. \n-00003ff0: 4173 2073 6f6f 6e0a 2020 2020 2074 6861 As soon. tha\n-00004000: 7420 6174 206c 6561 7374 206f 6e65 2063 t at least one c\n-00004010: 6861 7261 6374 6572 2069 7320 6176 6169 haracter is avai\n-00004020: 6c61 626c 652c 2074 6865 2063 7572 7265 lable, the curre\n-00004030: 6e74 2072 6563 6570 7469 6f6e 0a20 2020 nt reception. \n-00004040: 2020 6275 6666 6572 2069 7320 7265 7475 buffer is retu\n-00004050: 726e 6564 2e0a 0a20 2020 2020 5468 6572 rned... Ther\n-00004060: 6520 6973 2075 7375 616c 6c79 206c 6974 e is usually lit\n-00004070: 746c 6520 6761 696e 2069 6e20 7573 696e tle gain in usin\n-00004080: 6720 7468 6973 2066 756e 6374 696f 6e20 g this function \n-00004090: 7768 6f73 6520 6265 6861 7669 6f72 0a20 whose behavior. \n-000040a0: 2020 2020 6973 2063 6f6d 7061 7261 626c is comparabl\n-000040b0: 6520 746f 2074 6865 206f 6e65 206f 6620 e to the one of \n-000040c0: 2a6e 6f74 6520 5265 6365 6976 6520 2866 *note Receive (f\n-000040d0: 756e 6374 696f 6e29 3a3a 2e20 204f 7468 unction)::. Oth\n-000040e0: 6572 0a20 2020 2020 6675 6e63 7469 6f6e er. function\n-000040f0: 7320 7375 6368 2061 7320 2a6e 6f74 6520 s such as *note \n-00004100: 4765 745f 4368 6172 2028 6675 6e63 7469 Get_Char (functi\n-00004110: 6f6e 293a 3a2c 206f 7220 2a6e 6f74 6520 on)::, or *note \n-00004120: 4765 745f 4c69 6e65 0a20 2020 2020 2866 Get_Line. (f\n-00004130: 756e 6374 696f 6e29 3a3a 2c20 616c 6c6f unction)::, allo\n-00004140: 7720 6d6f 7265 2073 7472 7563 7475 7265 w more structure\n-00004150: 6420 7072 6f67 7261 6d6d 696e 672e 0a0a d programming...\n-00004160: 2020 2020 2048 6f77 6576 6572 2c20 7468 However, th\n-00004170: 6973 2066 756e 6374 696f 6e20 6d61 7920 is function may \n-00004180: 6265 2075 7365 6420 746f 2061 766f 6964 be used to avoid\n-00004190: 206c 6f73 696e 6720 6368 6172 6163 7465 losing characte\n-000041a0: 7273 2077 6865 6e0a 2020 2020 2063 616c rs when. cal\n-000041b0: 6c69 6e67 202a 6e6f 7465 2055 6e73 6574 ling *note Unset\n-000041c0: 5f42 7566 6665 7220 2870 726f 6365 6475 _Buffer (procedu\n-000041d0: 7265 293a 3a2c 2069 662c 2066 6f72 2073 re)::, if, for s\n-000041e0: 6f6d 6520 7265 6173 6f6e 2c20 7468 650a ome reason, the.\n-000041f0: 2020 2020 2072 656d 6f74 6520 686f 7374 remote host\n-00004200: 206d 6179 2068 6176 6520 7365 6e74 2073 may have sent s\n-00004210: 6f6d 652e 0a0a 4558 4345 5054 494f 4e53 ome...EXCEPTIONS\n-00004220: 0a20 2020 2020 e280 9843 6f6e 6e65 6374 . ...Connect\n-00004230: 696f 6e5f 436c 6f73 6564 e280 9950 6565 ion_Closed...Pee\n-00004240: 7220 6861 7320 636c 6f73 6564 2074 6865 r has closed the\n-00004250: 2063 6f6e 6e65 6374 696f 6e20 6265 666f connection befo\n-00004260: 7265 0a20 2020 2020 2020 2020 2020 2020 re. \n-00004270: 2020 2020 2020 2020 2020 2073 656e 6469 sendi\n-00004280: 6e67 2061 6e79 2064 6174 610a 0a1f 0a46 ng any data....F\n-00004290: 696c 653a 2061 6461 736f 636b 6574 732e ile: adasockets.\n-000042a0: 696e 666f 2c20 204e 6f64 653a 2047 6574 info, Node: Get\n-000042b0: 5f43 6861 7220 2866 756e 6374 696f 6e29 _Char (function)\n-000042c0: 2c20 204e 6578 743a 2047 6574 5f4c 696e , Next: Get_Lin\n-000042d0: 6520 2866 756e 6374 696f 6e29 2c20 2050 e (function), P\n-000042e0: 7265 763a 2047 6574 2028 6675 6e63 7469 rev: Get (functi\n-000042f0: 6f6e 292c 2020 5570 3a20 4163 6365 7074 on), Up: Accept\n-00004300: 5f53 6f63 6b65 7420 2870 726f 6365 6475 _Socket (procedu\n-00004310: 7265 290a 0a47 6574 5f43 6861 7220 2866 re)..Get_Char (f\n-00004320: 756e 6374 696f 6e29 0a2d 2d2d 2d2d 2d2d unction).-------\n-00004330: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 0a0a 5055 ------------..PU\n-00004340: 5250 4f53 450a 2020 2020 2047 6574 2061 RPOSE. Get a\n-00004350: 2063 6861 7261 6374 6572 2066 726f 6d20 character from \n-00004360: 6120 7265 6d6f 7465 2068 6f73 740a 5052 a remote host.PR\n-00004370: 4f54 4f54 5950 450a 2020 2020 2020 2d2d OTOTYPE. --\n-00004380: 2053 6f63 6b65 7473 2e47 6574 5f43 6861 Sockets.Get_Cha\n-00004390: 723a 2066 756e 6374 696f 6e20 4765 745f r: function Get_\n-000043a0: 4368 6172 2028 534f 434b 4554 203a 2053 Char (SOCKET : S\n-000043b0: 6f63 6b65 745f 4644 2743 6c61 7373 290a ocket_FD'Class).\n-000043c0: 2020 2020 2020 2020 2020 2020 2020 2072 r\n-000043d0: 6574 7572 6e20 4368 6172 6163 7465 723b eturn Character;\n-000043e0: 0a0a 5041 5241 4d45 5445 5253 0a20 2020 ..PARAMETERS. \n-000043f0: 2020 534f 434b 4554 2020 2020 2069 6e20 SOCKET in \n-00004400: 2020 2020 2020 2020 496e 6974 6961 6c69 Initiali\n-00004410: 7a65 6420 616e 6420 636f 6e6e 6563 7465 zed and connecte\n-00004420: 6420 736f 636b 6574 206f 626a 6563 740a d socket object.\n-00004430: 0a52 4554 5552 4e20 5641 4c55 450a 2020 .RETURN VALUE. \n-00004440: 2020 204f 6e65 2063 6861 7261 6374 6572 One character\n-00004450: 2073 656e 7420 6279 2074 6865 2072 656d sent by the rem\n-00004460: 6f74 6520 686f 7374 0a0a 4445 5343 5249 ote host..DESCRI\n-00004470: 5054 494f 4e0a 2020 2020 2054 6869 7320 PTION. This \n-00004480: 6675 6e63 7469 6f6e 2072 6563 6569 7665 function receive\n-00004490: 7320 6578 6163 746c 7920 6f6e 6520 6368 s exactly one ch\n-000044a0: 6172 6163 7465 7220 6672 6f6d 2074 6865 aracter from the\n-000044b0: 2072 656d 6f74 6520 686f 7374 2e0a 0a45 remote host...E\n-000044c0: 5843 4550 5449 4f4e 530a 2020 2020 20e2 XCEPTIONS. .\n-000044d0: 8098 436f 6e6e 6563 7469 6f6e 5f43 6c6f ..Connection_Clo\n-000044e0: 7365 64e2 8099 5065 6572 2068 6173 2063 sed...Peer has c\n-000044f0: 6c6f 7365 6420 7468 6520 636f 6e6e 6563 losed the connec\n-00004500: 7469 6f6e 2062 6566 6f72 650a 2020 2020 tion before. \n-00004510: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00004520: 2020 2020 7365 6e64 696e 6720 7468 6520 sending the \n-00004530: 6368 6172 6163 7465 720a 0a53 4545 2041 character..SEE A\n-00004540: 4c53 4f0a 2020 2020 202a 6e6f 7465 2047 LSO. *note G\n-00004550: 6574 2028 6675 6e63 7469 6f6e 293a 3a2c et (function)::,\n-00004560: 0a20 2020 2020 2a6e 6f74 6520 4765 745f . *note Get_\n-00004570: 4c69 6e65 2028 6675 6e63 7469 6f6e 293a Line (function):\n-00004580: 3a2c 0a20 2020 2020 2a6e 6f74 6520 4765 :,. *note Ge\n-00004590: 745f 4c69 6e65 2028 7072 6f63 6564 7572 t_Line (procedur\n-000045a0: 6529 3a3a 2c0a 2020 2020 202a 6e6f 7465 e)::,. *note\n-000045b0: 2052 6563 6569 7665 2028 7072 6f63 6564 Receive (proced\n-000045c0: 7572 6529 3a3a 2c0a 2020 2020 202a 6e6f ure)::,. *no\n-000045d0: 7465 2053 6574 5f42 7566 6665 7220 2870 te Set_Buffer (p\n-000045e0: 726f 6365 6475 7265 293a 3a2e 0a0a 1f0a rocedure)::.....\n-000045f0: 4669 6c65 3a20 6164 6173 6f63 6b65 7473 File: adasockets\n-00004600: 2e69 6e66 6f2c 2020 4e6f 6465 3a20 4765 .info, Node: Ge\n-00004610: 745f 4c69 6e65 2028 6675 6e63 7469 6f6e t_Line (function\n-00004620: 292c 2020 4e65 7874 3a20 4765 745f 4c69 ), Next: Get_Li\n-00004630: 6e65 2028 7072 6f63 6564 7572 6529 2c20 ne (procedure), \n-00004640: 2050 7265 763a 2047 6574 5f43 6861 7220 Prev: Get_Char \n-00004650: 2866 756e 6374 696f 6e29 2c20 2055 703a (function), Up:\n-00004660: 2041 6363 6570 745f 536f 636b 6574 2028 Accept_Socket (\n-00004670: 7072 6f63 6564 7572 6529 0a0a 4765 745f procedure)..Get_\n-00004680: 4c69 6e65 2028 6675 6e63 7469 6f6e 290a Line (function).\n-00004690: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n-000046a0: 2d2d 2d0a 0a50 5552 504f 5345 0a20 2020 ---..PURPOSE. \n-000046b0: 2020 4765 7420 6120 7768 6f6c 6520 6c69 Get a whole li\n-000046c0: 6e65 2066 726f 6d20 6120 7265 6d6f 7465 ne from a remote\n-000046d0: 2068 6f73 740a 5052 4f54 4f54 5950 450a host.PROTOTYPE.\n-000046e0: 2020 2020 2020 2d2d 2053 6f63 6b65 7473 -- Sockets\n-000046f0: 2e47 6574 5f4c 696e 653a 2066 756e 6374 .Get_Line: funct\n-00004700: 696f 6e20 4765 745f 4c69 6e65 2028 534f ion Get_Line (SO\n-00004710: 434b 4554 203a 2053 6f63 6b65 745f 4644 CKET : Socket_FD\n-00004720: 2743 6c61 7373 3b0a 2020 2020 2020 2020 'Class;. \n-00004730: 2020 2020 2020 204d 4158 5f4c 454e 4754 MAX_LENGT\n-00004740: 4820 3a20 506f 7369 7469 7665 203a 3d20 H : Positive := \n-00004750: 3230 3438 290a 2020 2020 2020 2020 2020 2048). \n-00004760: 2020 2020 2072 6574 7572 6e20 5374 7269 return Stri\n-00004770: 6e67 3b0a 0a50 4152 414d 4554 4552 530a ng;..PARAMETERS.\n-00004780: 2020 2020 2053 4f43 4b45 5420 2020 2020 SOCKET \n-00004790: 696e 2020 2020 2020 2020 2049 6e69 7469 in Initi\n-000047a0: 616c 697a 6564 2061 6e64 2063 6f6e 6e65 alized and conne\n-000047b0: 6374 6564 2073 6f63 6b65 7420 6f62 6a65 cted socket obje\n-000047c0: 6374 0a20 2020 2020 4d41 585f 4c45 4e47 ct. MAX_LENG\n-000047d0: 5448 2069 6e20 2020 2020 2020 2020 4d61 TH in Ma\n-000047e0: 7869 6d75 6d20 7265 7475 726e 6564 206c ximum returned l\n-000047f0: 696e 6520 6c65 6e67 7468 0a0a 5245 5455 ine length..RETU\n-00004800: 524e 2056 414c 5545 0a20 2020 2020 4120 RN VALUE. A \n-00004810: 6c69 6e65 2077 6974 686f 7574 2074 6865 line without the\n-00004820: 2043 5220 616e 6420 4c46 2073 6570 6172 CR and LF separ\n-00004830: 6174 6f72 730a 0a44 4553 4352 4950 5449 ators..DESCRIPTI\n-00004840: 4f4e 0a20 2020 2020 5468 6973 2066 756e ON. This fun\n-00004850: 6374 696f 6e20 7265 6365 6976 6573 206f ction receives o\n-00004860: 6e65 206c 696e 6520 6672 6f6d 2074 6865 ne line from the\n-00004870: 2072 656d 6f74 6520 686f 7374 2e20 2041 remote host. A\n-00004880: 206c 696e 650a 2020 2020 2063 6f6e 7369 line. consi\n-00004890: 7374 7320 696e 746f 207a 6572 6f20 6f72 sts into zero or\n-000048a0: 206d 6f72 6520 6368 6172 6163 7465 7273 more characters\n-000048b0: 2066 6f6c 6c6f 7765 6420 6279 2061 6e20 followed by an \n-000048c0: 6f70 7469 6f6e 616c 2043 520a 2020 2020 optional CR. \n-000048d0: 2061 6e64 2062 7920 6120 4c46 2e20 5468 and by a LF. Th\n-000048e0: 6f73 6520 7465 726d 696e 6174 6f72 7320 ose terminators \n-000048f0: 6172 6520 7374 7269 7070 6564 2062 6566 are stripped bef\n-00004900: 6f72 6520 7468 6520 6c69 6e65 2069 730a ore the line is.\n-00004910: 2020 2020 2072 6574 7572 6e65 642e 0a0a returned...\n-00004920: 2020 2020 2054 6869 7320 6675 6e63 7469 This functi\n-00004930: 6f6e 2062 6c6f 636b 7320 756e 7469 6c20 on blocks until \n-00004940: 6f6e 6520 6675 6c6c 206c 696e 6520 6861 one full line ha\n-00004950: 7320 6265 656e 2072 6563 6569 7665 642e s been received.\n-00004960: 2020 5468 650a 2020 2020 206c 696e 6520 The. line \n-00004970: 6c65 6e67 7468 2069 7320 6c69 6d69 7465 length is limite\n-00004980: 6420 7769 7468 2074 6865 2076 616c 7565 d with the value\n-00004990: 206f 6620 7468 6520 4d61 785f 4c65 6e67 of the Max_Leng\n-000049a0: 7468 2061 7267 756d 656e 742c 0a20 2020 th argument,. \n-000049b0: 2020 746f 2061 766f 6964 2065 7868 6175 to avoid exhau\n-000049c0: 7374 696f 6e20 6f66 2074 6865 2073 6563 stion of the sec\n-000049d0: 6f6e 6461 7279 2073 7461 636b 2e0a 0a45 ondary stack...E\n-000049e0: 5843 4550 5449 4f4e 530a 2020 2020 20e2 XCEPTIONS. .\n-000049f0: 8098 436f 6e6e 6563 7469 6f6e 5f43 6c6f ..Connection_Clo\n-00004a00: 7365 64e2 8099 5065 6572 2068 6173 2063 sed...Peer has c\n-00004a10: 6c6f 7365 6420 7468 6520 636f 6e6e 6563 losed the connec\n-00004a20: 7469 6f6e 2062 6566 6f72 650a 2020 2020 tion before. \n-00004a30: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00004a40: 2020 2020 7365 6e64 696e 6720 6120 7768 sending a wh\n-00004a50: 6f6c 6520 6c69 6e65 0a0a 5345 4520 414c ole line..SEE AL\n-00004a60: 534f 0a20 2020 2020 2a6e 6f74 6520 4765 SO. *note Ge\n-00004a70: 7420 2866 756e 6374 696f 6e29 3a3a 2c0a t (function)::,.\n-00004a80: 2020 2020 202a 6e6f 7465 2047 6574 5f43 *note Get_C\n-00004a90: 6861 7220 2866 756e 6374 696f 6e29 3a3a har (function)::\n-00004aa0: 2c0a 2020 2020 202a 6e6f 7465 2047 6574 ,. *note Get\n-00004ab0: 5f4c 696e 6520 2870 726f 6365 6475 7265 _Line (procedure\n-00004ac0: 293a 3a2c 0a20 2020 2020 2a6e 6f74 6520 )::,. *note \n-00004ad0: 5265 6365 6976 6520 2870 726f 6365 6475 Receive (procedu\n-00004ae0: 7265 293a 3a2c 0a20 2020 2020 2a6e 6f74 re)::,. *not\n-00004af0: 6520 5365 745f 4275 6666 6572 2028 7072 e Set_Buffer (pr\n-00004b00: 6f63 6564 7572 6529 3a3a 2e0a 0a1f 0a46 ocedure)::.....F\n-00004b10: 696c 653a 2061 6461 736f 636b 6574 732e ile: adasockets.\n-00004b20: 696e 666f 2c20 204e 6f64 653a 2047 6574 info, Node: Get\n-00004b30: 5f4c 696e 6520 2870 726f 6365 6475 7265 _Line (procedure\n-00004b40: 292c 2020 4e65 7874 3a20 4765 745f 5265 ), Next: Get_Re\n-00004b50: 6365 6976 655f 5175 6575 655f 5369 7a65 ceive_Queue_Size\n-00004b60: 2028 6675 6e63 7469 6f6e 292c 2020 5072 (function), Pr\n-00004b70: 6576 3a20 4765 745f 4c69 6e65 2028 6675 ev: Get_Line (fu\n-00004b80: 6e63 7469 6f6e 292c 2020 5570 3a20 4163 nction), Up: Ac\n-00004b90: 6365 7074 5f53 6f63 6b65 7420 2870 726f cept_Socket (pro\n-00004ba0: 6365 6475 7265 290a 0a47 6574 5f4c 696e cedure)..Get_Lin\n-00004bb0: 6520 2870 726f 6365 6475 7265 290a 2d2d e (procedure).--\n-00004bc0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n-00004bd0: 2d2d 0a0a 5055 5250 4f53 450a 2020 2020 --..PURPOSE. \n-00004be0: 2047 6574 2061 2077 686f 6c65 206c 696e Get a whole lin\n-00004bf0: 6520 6672 6f6d 2061 2072 656d 6f74 6520 e from a remote \n-00004c00: 686f 7374 0a50 524f 544f 5459 5045 0a20 host.PROTOTYPE. \n-00004c10: 2020 2020 202d 2d20 536f 636b 6574 732e -- Sockets.\n-00004c20: 4765 745f 4c69 6e65 3a20 7072 6f63 6564 Get_Line: proced\n-00004c30: 7572 6520 4765 745f 4c69 6e65 2028 534f ure Get_Line (SO\n-00004c40: 434b 4554 203a 2053 6f63 6b65 745f 4644 CKET : Socket_FD\n-00004c50: 2743 6c61 7373 3b0a 2020 2020 2020 2020 'Class;. \n-00004c60: 2020 2020 2020 2053 5452 203a 2069 6e20 STR : in \n-00004c70: 6f75 7420 5374 7269 6e67 3b20 4c41 5354 out String; LAST\n-00004c80: 203a 206f 7574 204e 6174 7572 616c 293b : out Natural);\n-00004c90: 0a0a 5041 5241 4d45 5445 5253 0a20 2020 ..PARAMETERS. \n-00004ca0: 2020 534f 434b 4554 2020 2020 2069 6e20 SOCKET in \n-00004cb0: 2020 2020 2020 2020 496e 6974 6961 6c69 Initiali\n-00004cc0: 7a65 6420 616e 6420 636f 6e6e 6563 7465 zed and connecte\n-00004cd0: 6420 736f 636b 6574 206f 626a 6563 740a d socket object.\n-00004ce0: 2020 2020 2053 5452 2020 2020 2020 2020 STR \n-00004cf0: 696e 206f 7574 2020 2020 2053 7472 696e in out Strin\n-00004d00: 6720 746f 2066 696c 6c0a 2020 2020 204c g to fill. L\n-00004d10: 4153 5420 2020 2020 2020 6f75 7420 2020 AST out \n-00004d20: 2020 2020 204c 6173 7420 696e 6465 7820 Last index \n-00004d30: 7573 6564 2069 6e20 7468 6520 7374 7269 used in the stri\n-00004d40: 6e67 0a0a 4445 5343 5249 5054 494f 4e0a ng..DESCRIPTION.\n-00004d50: 2020 2020 2054 6869 7320 7072 6f63 6564 This proced\n-00004d60: 7572 6520 7265 6365 6976 6573 206f 6e65 ure receives one\n-00004d70: 206c 696e 6520 6672 6f6d 2074 6865 2072 line from the r\n-00004d80: 656d 6f74 6520 686f 7374 2e20 2041 206c emote host. A l\n-00004d90: 696e 650a 2020 2020 2063 6f6e 7369 7374 ine. consist\n-00004da0: 7320 696e 746f 207a 6572 6f20 6f72 206d s into zero or m\n-00004db0: 6f72 6520 6368 6172 6163 7465 7273 2066 ore characters f\n-00004dc0: 6f6c 6c6f 7765 6420 6279 2061 6e20 6f70 ollowed by an op\n-00004dd0: 7469 6f6e 616c 2043 520a 2020 2020 2061 tional CR. a\n-00004de0: 6e64 2062 7920 6120 4c46 2e20 5468 6f73 nd by a LF. Thos\n-00004df0: 6520 7465 726d 696e 6174 6f72 7320 6172 e terminators ar\n-00004e00: 6520 7374 7269 7070 6564 2062 6566 6f72 e stripped befor\n-00004e10: 6520 7468 6520 6c69 6e65 2069 730a 2020 e the line is. \n-00004e20: 2020 2072 6574 7572 6e65 642e 0a0a 2020 returned... \n-00004e30: 2020 2054 6869 7320 7072 6f63 6564 7572 This procedur\n-00004e40: 6520 626c 6f63 6b73 2075 6e74 696c 206f e blocks until o\n-00004e50: 6e65 2066 756c 6c20 6c69 6e65 2068 6173 ne full line has\n-00004e60: 2062 6565 6e20 7265 6365 6976 6564 2e0a been received..\n-00004e70: 0a45 5843 4550 5449 4f4e 530a 2020 2020 .EXCEPTIONS. \n-00004e80: 20e2 8098 436f 6e6e 6563 7469 6f6e 5f43 ...Connection_C\n-00004e90: 6c6f 7365 64e2 8099 5065 6572 2068 6173 losed...Peer has\n-00004ea0: 2063 6c6f 7365 6420 7468 6520 636f 6e6e closed the conn\n-00004eb0: 6563 7469 6f6e 2062 6566 6f72 650a 2020 ection before. \n-00004ec0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00004ed0: 2020 2020 2020 7365 6e64 696e 6720 6120 sending a \n-00004ee0: 7768 6f6c 6520 6c69 6e65 0a0a 5345 4520 whole line..SEE \n-00004ef0: 414c 534f 0a20 2020 2020 2a6e 6f74 6520 ALSO. *note \n-00004f00: 4765 7420 2866 756e 6374 696f 6e29 3a3a Get (function)::\n-00004f10: 2c0a 2020 2020 202a 6e6f 7465 2047 6574 ,. *note Get\n-00004f20: 5f43 6861 7220 2866 756e 6374 696f 6e29 _Char (function)\n-00004f30: 3a3a 2c0a 2020 2020 202a 6e6f 7465 2047 ::,. *note G\n-00004f40: 6574 5f4c 696e 6520 2866 756e 6374 696f et_Line (functio\n-00004f50: 6e29 3a3a 2c0a 2020 2020 202a 6e6f 7465 n)::,. *note\n-00004f60: 2052 6563 6569 7665 2028 7072 6f63 6564 Receive (proced\n-00004f70: 7572 6529 3a3a 2c0a 2020 2020 202a 6e6f ure)::,. *no\n-00004f80: 7465 2053 6574 5f42 7566 6665 7220 2870 te Set_Buffer (p\n-00004f90: 726f 6365 6475 7265 293a 3a2e 0a0a 1f0a rocedure)::.....\n-00004fa0: 4669 6c65 3a20 6164 6173 6f63 6b65 7473 File: adasockets\n-00004fb0: 2e69 6e66 6f2c 2020 4e6f 6465 3a20 4765 .info, Node: Ge\n-00004fc0: 745f 5265 6365 6976 655f 5175 6575 655f t_Receive_Queue_\n-00004fd0: 5369 7a65 2028 6675 6e63 7469 6f6e 292c Size (function),\n-00004fe0: 2020 4e65 7874 3a20 4765 745f 5365 6e64 Next: Get_Send\n-00004ff0: 5f51 7565 7565 5f53 697a 6520 2866 756e _Queue_Size (fun\n-00005000: 6374 696f 6e29 2c20 2050 7265 763a 2047 ction), Prev: G\n-00005010: 6574 5f4c 696e 6520 2870 726f 6365 6475 et_Line (procedu\n-00005020: 7265 292c 2020 5570 3a20 4163 6365 7074 re), Up: Accept\n-00005030: 5f53 6f63 6b65 7420 2870 726f 6365 6475 _Socket (procedu\n-00005040: 7265 290a 0a47 6574 5f52 6563 6569 7665 re)..Get_Receive\n-00005050: 5f51 7565 7565 5f53 697a 6520 2866 756e _Queue_Size (fun\n-00005060: 6374 696f 6e29 0a2d 2d2d 2d2d 2d2d 2d2d ction).---------\n-00005070: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n-00005080: 2d2d 2d2d 2d2d 2d2d 0a0a 5055 5250 4f53 --------..PURPOS\n-00005090: 450a 2020 2020 2052 6574 7572 6e20 7468 E. Return th\n-000050a0: 6520 7369 7a65 206f 6620 7468 6520 756e e size of the un\n-000050b0: 7265 6164 2064 6174 6120 696e 2074 6865 read data in the\n-000050c0: 2069 6e70 7574 2071 7565 7565 0a50 524f input queue.PRO\n-000050d0: 544f 5459 5045 0a20 2020 2020 202d 2d20 TOTYPE. -- \n-000050e0: 536f 636b 6574 732e 4765 745f 5265 6365 Sockets.Get_Rece\n-000050f0: 6976 655f 5175 6575 655f 5369 7a65 3a20 ive_Queue_Size: \n-00005100: 6675 6e63 7469 6f6e 2047 6574 5f52 6563 function Get_Rec\n-00005110: 6569 7665 5f51 7565 7565 5f53 697a 650a eive_Queue_Size.\n-00005120: 2020 2020 2020 2020 2020 2020 2020 2028 (\n-00005130: 534f 434b 4554 203a 2053 6f63 6b65 745f SOCKET : Socket_\n-00005140: 4644 2743 6c61 7373 290a 2020 2020 2020 FD'Class). \n-00005150: 2020 2020 2020 2020 2072 6574 7572 6e20 return \n-00005160: 496e 7465 6765 723b 0a0a 5041 5241 4d45 Integer;..PARAME\n-00005170: 5445 5253 0a20 2020 2020 534f 434b 4554 TERS. SOCKET\n-00005180: 2020 2020 2069 6e20 2020 2020 2020 2020 in \n-00005190: 496e 6974 6961 6c69 7a65 6420 616e 6420 Initialized and \n-000051a0: 636f 6e6e 6563 7465 6420 736f 636b 6574 connected socket\n-000051b0: 206f 626a 6563 740a 0a52 4554 5552 4e20 object..RETURN \n-000051c0: 5641 4c55 450a 2020 2020 2054 6865 206e VALUE. The n\n-000051d0: 6f6e 2d6e 6567 6174 6976 6520 7369 7a65 on-negative size\n-000051e0: 2069 6e20 6279 7465 7320 6f66 2074 6865 in bytes of the\n-000051f0: 2069 6e70 7574 2071 7565 7565 0a0a 4445 input queue..DE\n-00005200: 5343 5249 5054 494f 4e0a 2020 2020 2054 SCRIPTION. T\n-00005210: 6869 7320 6675 6e63 7469 6f6e 2069 7320 his function is \n-00005220: 6f6e 6c79 2061 7661 696c 6162 6c65 206f only available o\n-00005230: 6e20 4c69 6e75 7820 706c 6174 666f 726d n Linux platform\n-00005240: 732e 2020 4f6e 206f 7468 6572 0a20 2020 s. On other. \n-00005250: 2020 6f70 6572 6174 696e 6720 7379 7374 operating syst\n-00005260: 656d 732c 2069 7420 7769 6c6c 2072 6574 ems, it will ret\n-00005270: 7572 6e20 2d32 2074 6f20 696e 6469 6361 urn -2 to indica\n-00005280: 7465 2074 6861 7420 7468 6520 6e65 6365 te that the nece\n-00005290: 7373 6172 790a 2020 2020 206d 6563 6861 ssary. mecha\n-000052a0: 6e69 736d 7320 746f 2072 6574 7269 6576 nisms to retriev\n-000052b0: 6520 7468 6520 696e 666f 726d 6174 696f e the informatio\n-000052c0: 6e20 6172 6520 6e6f 7420 6176 6169 6c61 n are not availa\n-000052d0: 626c 652e 0a0a 5345 4520 414c 534f 0a20 ble...SEE ALSO. \n-000052e0: 2020 2020 2a6e 6f74 6520 5265 6365 6976 *note Receiv\n-000052f0: 6520 2870 726f 6365 6475 7265 293a 3a2e e (procedure)::.\n-00005300: 0a0a 1f0a 4669 6c65 3a20 6164 6173 6f63 ....File: adasoc\n-00005310: 6b65 7473 2e69 6e66 6f2c 2020 4e6f 6465 kets.info, Node\n-00005320: 3a20 4765 745f 5365 6e64 5f51 7565 7565 : Get_Send_Queue\n-00005330: 5f53 697a 6520 2866 756e 6374 696f 6e29 _Size (function)\n-00005340: 2c20 204e 6578 743a 2047 6574 736f 636b , Next: Getsock\n-00005350: 6f70 7420 2870 726f 6365 6475 7265 292c opt (procedure),\n-00005360: 2020 5072 6576 3a20 4765 745f 5265 6365 Prev: Get_Rece\n-00005370: 6976 655f 5175 6575 655f 5369 7a65 2028 ive_Queue_Size (\n-00005380: 6675 6e63 7469 6f6e 292c 2020 5570 3a20 function), Up: \n-00005390: 4163 6365 7074 5f53 6f63 6b65 7420 2870 Accept_Socket (p\n-000053a0: 726f 6365 6475 7265 290a 0a47 6574 5f53 rocedure)..Get_S\n-000053b0: 656e 645f 5175 6575 655f 5369 7a65 2028 end_Queue_Size (\n-000053c0: 6675 6e63 7469 6f6e 290a 2d2d 2d2d 2d2d function).------\n-000053d0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n-000053e0: 2d2d 2d2d 2d2d 2d2d 0a0a 5055 5250 4f53 --------..PURPOS\n-000053f0: 450a 2020 2020 2052 6574 7572 6e20 7468 E. Return th\n-00005400: 6520 7369 7a65 206f 6620 7468 6520 756e e size of the un\n-00005410: 7365 6e74 2064 6174 6120 696e 2074 6865 sent data in the\n-00005420: 206f 7574 7075 7420 7175 6575 650a 5052 output queue.PR\n-00005430: 4f54 4f54 5950 450a 2020 2020 2020 2d2d OTOTYPE. --\n-00005440: 2053 6f63 6b65 7473 2e47 6574 5f53 656e Sockets.Get_Sen\n-00005450: 645f 5175 6575 655f 5369 7a65 3a20 6675 d_Queue_Size: fu\n-00005460: 6e63 7469 6f6e 2047 6574 5f53 656e 645f nction Get_Send_\n-00005470: 5175 6575 655f 5369 7a65 0a20 2020 2020 Queue_Size. \n-00005480: 2020 2020 2020 2020 2020 2853 4f43 4b45 (SOCKE\n-00005490: 5420 3a20 536f 636b 6574 5f46 4427 436c T : Socket_FD'Cl\n-000054a0: 6173 7329 0a20 2020 2020 2020 2020 2020 ass). \n-000054b0: 2020 2020 7265 7475 726e 2049 6e74 6567 return Integ\n-000054c0: 6572 3b0a 0a50 4152 414d 4554 4552 530a er;..PARAMETERS.\n-000054d0: 2020 2020 2053 4f43 4b45 5420 2020 2020 SOCKET \n-000054e0: 696e 2020 2020 2020 2020 2049 6e69 7469 in Initi\n-000054f0: 616c 697a 6564 2061 6e64 2063 6f6e 6e65 alized and conne\n-00005500: 6374 6564 2073 6f63 6b65 7420 6f62 6a65 cted socket obje\n-00005510: 6374 0a0a 5245 5455 524e 2056 414c 5545 ct..RETURN VALUE\n-00005520: 0a20 2020 2020 5468 6520 6e6f 6e2d 6e65 . The non-ne\n-00005530: 6761 7469 7665 2073 697a 6520 696e 2062 gative size in b\n-00005540: 7974 6573 206f 6620 7468 6520 6f75 7470 ytes of the outp\n-00005550: 7574 2071 7565 7565 0a0a 4445 5343 5249 ut queue..DESCRI\n-00005560: 5054 494f 4e0a 2020 2020 2054 6869 7320 PTION. This \n-00005570: 6675 6e63 7469 6f6e 2069 7320 6f6e 6c79 function is only\n-00005580: 2061 7661 696c 6162 6c65 206f 6e20 4c69 available on Li\n-00005590: 6e75 7820 706c 6174 666f 726d 732e 2020 nux platforms. \n-000055a0: 4f6e 206f 7468 6572 0a20 2020 2020 6f70 On other. op\n-000055b0: 6572 6174 696e 6720 7379 7374 656d 732c erating systems,\n-000055c0: 2069 7420 7769 6c6c 2072 6574 7572 6e20 it will return \n-000055d0: 2d32 2074 6f20 696e 6469 6361 7465 2074 -2 to indicate t\n-000055e0: 6861 7420 7468 6520 6e65 6365 7373 6172 hat the necessar\n-000055f0: 790a 2020 2020 206d 6563 6861 6e69 736d y. mechanism\n-00005600: 7320 746f 2072 6574 7269 6576 6520 7468 s to retrieve th\n-00005610: 6520 696e 666f 726d 6174 696f 6e20 6172 e information ar\n-00005620: 6520 6e6f 7420 6176 6169 6c61 626c 652e e not available.\n-00005630: 0a0a 5345 4520 414c 534f 0a20 2020 2020 ..SEE ALSO. \n-00005640: 2a6e 6f74 6520 5365 6e64 2028 7072 6f63 *note Send (proc\n-00005650: 6564 7572 6529 3a3a 2e0a 0a1f 0a46 696c edure)::.....Fil\n-00005660: 653a 2061 6461 736f 636b 6574 732e 696e e: adasockets.in\n-00005670: 666f 2c20 204e 6f64 653a 2047 6574 736f fo, Node: Getso\n-00005680: 636b 6f70 7420 2870 726f 6365 6475 7265 ckopt (procedure\n-00005690: 292c 2020 4e65 7874 3a20 4c69 7374 656e ), Next: Listen\n-000056a0: 2028 7072 6f63 6564 7572 6529 2c20 2050 (procedure), P\n-000056b0: 7265 763a 2047 6574 5f53 656e 645f 5175 rev: Get_Send_Qu\n-000056c0: 6575 655f 5369 7a65 2028 6675 6e63 7469 eue_Size (functi\n-000056d0: 6f6e 292c 2020 5570 3a20 4163 6365 7074 on), Up: Accept\n-000056e0: 5f53 6f63 6b65 7420 2870 726f 6365 6475 _Socket (procedu\n-000056f0: 7265 290a 0a47 6574 736f 636b 6f70 7420 re)..Getsockopt \n-00005700: 2870 726f 6365 6475 7265 290a 2d2d 2d2d (procedure).----\n-00005710: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n-00005720: 2d2d 0a0a 5055 5250 4f53 450a 2020 2020 --..PURPOSE. \n-00005730: 2052 6574 7269 6576 6520 6120 736f 636b Retrieve a sock\n-00005740: 6574 206f 7074 696f 6e0a 5052 4f54 4f54 et option.PROTOT\n-00005750: 5950 450a 2020 2020 2020 2d2d 2053 6f63 YPE. -- Soc\n-00005760: 6b65 7473 2e47 6574 736f 636b 6f70 743a kets.Getsockopt:\n-00005770: 2070 726f 6365 6475 7265 2047 6574 736f procedure Getso\n-00005780: 636b 6f70 7420 2853 4f43 4b45 5420 3a20 ckopt (SOCKET : \n-00005790: 536f 636b 6574 5f46 443b 0a20 2020 2020 Socket_FD;. \n-000057a0: 2020 2020 2020 2020 2020 4c45 5645 4c20 LEVEL \n-000057b0: 3a20 536f 636b 6574 5f4c 6576 656c 203a : Socket_Level :\n-000057c0: 3d20 534f 4c5f 534f 434b 4554 3b0a 2020 = SOL_SOCKET;. \n-000057d0: 2020 2020 2020 2020 2020 2020 204f 5054 OPT\n-000057e0: 4e41 4d45 203a 2053 6f63 6b65 745f 4f70 NAME : Socket_Op\n-000057f0: 7469 6f6e 3b20 4f50 5456 414c 203a 206f tion; OPTVAL : o\n-00005800: 7574 2049 6e74 6567 6572 293b 0a0a 5041 ut Integer);..PA\n-00005810: 5241 4d45 5445 5253 0a20 2020 2020 534f RAMETERS. SO\n-00005820: 434b 4554 2020 2020 2069 6e20 2020 2020 CKET in \n-00005830: 2020 2020 496e 6974 6961 6c69 7a65 6420 Initialized \n-00005840: 616e 6420 626f 756e 6420 736f 636b 6574 and bound socket\n-00005850: 206f 626a 6563 740a 2020 2020 204c 4556 object. LEV\n-00005860: 454c 2020 2020 2020 696e 2020 2020 2020 EL in \n-00005870: 2020 2050 726f 746f 636f 6c20 6c65 7665 Protocol leve\n-00005880: 6c0a 2020 2020 204f 5054 4e41 4d45 2020 l. OPTNAME \n-00005890: 2020 696e 2020 2020 2020 2020 204f 7074 in Opt\n-000058a0: 696f 6e20 6e61 6d65 0a20 2020 2020 4f50 ion name. OP\n-000058b0: 5456 414c 2020 2020 206f 7574 2020 2020 TVAL out \n-000058c0: 2020 2020 4f70 7469 6f6e 2076 616c 7565 Option value\n-000058d0: 0a0a 4445 5343 5249 5054 494f 4e0a 2020 ..DESCRIPTION. \n-000058e0: 2020 2054 6869 7320 7072 6f63 6564 7572 This procedur\n-000058f0: 6520 7265 7472 6965 7665 7320 6f70 7469 e retrieves opti\n-00005900: 6f6e 7320 6170 706c 6963 6162 6c65 2074 ons applicable t\n-00005910: 6f20 6120 736f 636b 6574 2e20 2050 6c65 o a socket. Ple\n-00005920: 6173 650a 2020 2020 2073 6565 2079 6f75 ase. see you\n-00005930: 7220 6f70 6572 6174 696e 6720 7379 7374 r operating syst\n-00005940: 656d 206d 616e 7561 6c20 666f 7220 7573 em manual for us\n-00005950: 6162 6c65 206c 6576 656c 7320 616e 6420 able levels and \n-00005960: 6f70 7469 6f6e 732e 0a0a 2020 2020 2054 options... T\n-00005970: 776f 206c 6576 656c 7320 6172 6520 6465 wo levels are de\n-00005980: 6669 6e65 643a 20e2 8098 534f 4c5f 534f fined: ...SOL_SO\n-00005990: 434b 4554 e280 9920 2874 6865 2064 6566 CKET... (the def\n-000059a0: 6175 6c74 2920 616e 640a 2020 2020 20e2 ault) and. .\n-000059b0: 8098 4950 5052 4f54 4f5f 4950 e280 992e ..IPPROTO_IP....\n-000059c0: 2020 5468 6520 6f70 7469 6f6e 7320 6172 The options ar\n-000059d0: 6520 e280 9853 4f5f 5245 5553 4541 4444 e ...SO_REUSEADD\n-000059e0: 52e2 8099 2c20 e280 9853 4f5f 5245 5553 R..., ...SO_REUS\n-000059f0: 4550 4f52 54e2 8099 2c0a 2020 2020 20e2 EPORT...,. .\n-00005a00: 8098 4950 5f4d 554c 5449 4341 5354 5f54 ..IP_MULTICAST_T\n-00005a10: 544c e280 992c 20e2 8098 4950 5f41 4444 TL..., ...IP_ADD\n-00005a20: 5f4d 454d 4245 5253 4849 50e2 8099 2c20 _MEMBERSHIP..., \n-00005a30: e280 9849 505f 4452 4f50 5f4d 454d 4245 ...IP_DROP_MEMBE\n-00005a40: 5253 4849 50e2 8099 2c0a 2020 2020 20e2 RSHIP...,. .\n-00005a50: 8098 4950 5f4d 554c 5449 4341 5354 5f4c ..IP_MULTICAST_L\n-00005a60: 4f4f 50e2 8099 2c20 e280 9853 4f5f 534e OOP..., ...SO_SN\n-00005a70: 4442 5546 e280 9920 616e 6420 e280 9849 DBUF... and ...I\n-00005a80: 505f 5243 5642 5546 e280 992e 0a0a 2020 P_RCVBUF...... \n-00005a90: 2020 204e 6f74 6520 7468 6174 2075 6e6c Note that unl\n-00005aa0: 696b 6520 7468 6569 7220 4320 6c61 6e67 ike their C lang\n-00005ab0: 7561 6765 2063 6f75 6e74 6572 7061 7274 uage counterpart\n-00005ac0: 2c20 e280 9847 6574 736f 636b 6f70 74e2 , ...Getsockopt.\n-00005ad0: 8099 2061 6e64 0a20 2020 2020 e280 9853 .. and. ...S\n-00005ae0: 6574 736f 636b 6f70 74e2 8099 2064 6f20 etsockopt... do \n-00005af0: 6e6f 7420 7265 7175 6972 6520 616e 2065 not require an e\n-00005b00: 7874 7261 2070 6172 616d 6574 6572 2072 xtra parameter r\n-00005b10: 6570 7265 7365 6e74 696e 6720 7468 650a epresenting the.\n-00005b20: 2020 2020 206c 656e 6774 6820 696e 2062 length in b\n-00005b30: 7974 6573 206f 6620 7468 6520 6f70 7469 ytes of the opti\n-00005b40: 6f6e 2076 616c 7565 2e20 2041 6461 536f on value. AdaSo\n-00005b50: 636b 6574 7320 6b6e 6f77 7320 7468 6520 ckets knows the \n-00005b60: 7269 6768 740a 2020 2020 2073 697a 6520 right. size \n-00005b70: 666f 7220 6576 6572 7920 6f70 7469 6f6e for every option\n-00005b80: 2e0a 0a53 4545 2041 4c53 4f0a 2020 2020 ...SEE ALSO. \n-00005b90: 202a 6e6f 7465 2053 6574 736f 636b 6f70 *note Setsockop\n-00005ba0: 7420 2870 726f 6365 6475 7265 293a 3a2e t (procedure)::.\n-00005bb0: 0a0a 1f0a 4669 6c65 3a20 6164 6173 6f63 ....File: adasoc\n-00005bc0: 6b65 7473 2e69 6e66 6f2c 2020 4e6f 6465 kets.info, Node\n-00005bd0: 3a20 4c69 7374 656e 2028 7072 6f63 6564 : Listen (proced\n-00005be0: 7572 6529 2c20 204e 6578 743a 204e 6577 ure), Next: New\n-00005bf0: 5f4c 696e 6520 2870 726f 6365 6475 7265 _Line (procedure\n-00005c00: 292c 2020 5072 6576 3a20 4765 7473 6f63 ), Prev: Getsoc\n-00005c10: 6b6f 7074 2028 7072 6f63 6564 7572 6529 kopt (procedure)\n-00005c20: 2c20 2055 703a 2041 6363 6570 745f 536f , Up: Accept_So\n-00005c30: 636b 6574 2028 7072 6f63 6564 7572 6529 cket (procedure)\n-00005c40: 0a0a 4c69 7374 656e 2028 7072 6f63 6564 ..Listen (proced\n-00005c50: 7572 6529 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d ure).-----------\n-00005c60: 2d2d 2d2d 2d2d 2d0a 0a50 5552 504f 5345 -------..PURPOSE\n-00005c70: 0a20 2020 2020 4573 7461 626c 6973 6820 . Establish \n-00005c80: 6120 6c69 7374 656e 2071 7565 7565 0a50 a listen queue.P\n-00005c90: 524f 544f 5459 5045 0a20 2020 2020 202d ROTOTYPE. -\n-00005ca0: 2d20 536f 636b 6574 732e 4c69 7374 656e - Sockets.Listen\n-00005cb0: 3a20 7072 6f63 6564 7572 6520 4c69 7374 : procedure List\n-00005cc0: 656e 2028 534f 434b 4554 203a 2053 6f63 en (SOCKET : Soc\n-00005cd0: 6b65 745f 4644 3b0a 2020 2020 2020 2020 ket_FD;. \n-00005ce0: 2020 2020 2020 2051 5545 5545 5f53 495a QUEUE_SIZ\n-00005cf0: 4520 3a20 506f 7369 7469 7665 203a 3d20 E : Positive := \n-00005d00: 3529 3b0a 0a50 4152 414d 4554 4552 530a 5);..PARAMETERS.\n-00005d10: 2020 2020 2053 4f43 4b45 5420 2020 2020 SOCKET \n-00005d20: 696e 2020 2020 2020 2020 2049 6e69 7469 in Initi\n-00005d30: 616c 697a 6564 2061 6e64 2062 6f75 6e64 alized and bound\n-00005d40: 2073 6f63 6b65 7420 6f62 6a65 6374 0a20 socket object. \n-00005d50: 2020 2020 5155 4555 455f 5349 5a45 2069 QUEUE_SIZE i\n-00005d60: 6e20 2020 2020 2020 2020 5265 7175 6573 n Reques\n-00005d70: 7465 6420 736c 6f74 7320 696e 2074 6865 ted slots in the\n-00005d80: 206c 6973 7465 6e20 7175 6575 650a 0a44 listen queue..D\n-00005d90: 4553 4352 4950 5449 4f4e 0a20 2020 2020 ESCRIPTION. \n-00005da0: 5468 6973 2070 726f 6365 6475 7265 2065 This procedure e\n-00005db0: 7374 6162 6c69 7368 6573 2061 206c 6973 stablishes a lis\n-00005dc0: 7465 6e20 7175 6575 6520 6166 7465 7220 ten queue after \n-00005dd0: 6120 5443 5020 736f 636b 6574 2061 730a a TCP socket as.\n-00005de0: 2020 2020 2062 6565 6e20 696e 6974 6961 been initia\n-00005df0: 6c69 7a65 6420 616e 6420 626f 756e 642e lized and bound.\n-00005e00: 2020 4561 6368 2073 6c6f 7420 696e 2074 Each slot in t\n-00005e10: 6865 2071 7565 7565 2063 616e 2068 6f6c he queue can hol\n-00005e20: 6420 6f6e 650a 2020 2020 2069 6e63 6f6d d one. incom\n-00005e30: 696e 6720 636f 6e6e 6563 7469 6f6e 2074 ing connection t\n-00005e40: 6861 7420 6861 7320 6e6f 7420 6265 656e hat has not been\n-00005e50: 2061 6363 6570 7465 6420 7965 742e 2020 accepted yet. \n-00005e60: 4e6f 7465 2074 6861 7420 6d6f 7374 0a20 Note that most. \n-00005e70: 2020 2020 6f70 6572 6174 696e 6720 7379 operating sy\n-00005e80: 7374 656d 7320 6967 6e6f 7265 2071 7565 stems ignore que\n-00005e90: 7565 2073 697a 6573 206c 6172 6765 7220 ue sizes larger \n-00005ea0: 7468 616e 2066 6976 652e 0a0a 5345 4520 than five...SEE \n-00005eb0: 414c 534f 0a20 2020 2020 2a6e 6f74 6520 ALSO. *note \n-00005ec0: 4163 6365 7074 5f53 6f63 6b65 7420 2870 Accept_Socket (p\n-00005ed0: 726f 6365 6475 7265 293a 3a2c 0a20 2020 rocedure)::,. \n-00005ee0: 2020 2a6e 6f74 6520 4269 6e64 2028 7072 *note Bind (pr\n-00005ef0: 6f63 6564 7572 6529 3a3a 2c0a 2020 2020 ocedure)::,. \n-00005f00: 202a 6e6f 7465 2053 6f63 6b65 7420 2870 *note Socket (p\n-00005f10: 726f 6365 6475 7265 293a 3a2e 0a0a 1f0a rocedure)::.....\n-00005f20: 4669 6c65 3a20 6164 6173 6f63 6b65 7473 File: adasockets\n-00005f30: 2e69 6e66 6f2c 2020 4e6f 6465 3a20 4e65 .info, Node: Ne\n-00005f40: 775f 4c69 6e65 2028 7072 6f63 6564 7572 w_Line (procedur\n-00005f50: 6529 2c20 204e 6578 743a 2050 7574 2028 e), Next: Put (\n-00005f60: 7072 6f63 6564 7572 6529 2c20 2050 7265 procedure), Pre\n-00005f70: 763a 204c 6973 7465 6e20 2870 726f 6365 v: Listen (proce\n-00005f80: 6475 7265 292c 2020 5570 3a20 4163 6365 dure), Up: Acce\n-00005f90: 7074 5f53 6f63 6b65 7420 2870 726f 6365 pt_Socket (proce\n-00005fa0: 6475 7265 290a 0a4e 6577 5f4c 696e 6520 dure)..New_Line \n-00005fb0: 2870 726f 6365 6475 7265 290a 2d2d 2d2d (procedure).----\n-00005fc0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n-00005fd0: 0a0a 5055 5250 4f53 450a 2020 2020 2053 ..PURPOSE. S\n-00005fe0: 656e 6420 6120 4352 2f4c 4620 746f 2061 end a CR/LF to a\n-00005ff0: 2072 656d 6f74 6520 686f 7374 0a50 524f remote host.PRO\n-00006000: 544f 5459 5045 0a20 2020 2020 202d 2d20 TOTYPE. -- \n-00006010: 536f 636b 6574 732e 4e65 775f 4c69 6e65 Sockets.New_Line\n-00006020: 3a20 7072 6f63 6564 7572 6520 4e65 775f : procedure New_\n-00006030: 4c69 6e65 2028 534f 434b 4554 203a 2053 Line (SOCKET : S\n-00006040: 6f63 6b65 745f 4644 2743 6c61 7373 3b0a ocket_FD'Class;.\n-00006050: 2020 2020 2020 2020 2020 2020 2020 2043 C\n-00006060: 4f55 4e54 203a 204e 6174 7572 616c 203a OUNT : Natural :\n-00006070: 3d20 3129 3b0a 0a50 4152 414d 4554 4552 = 1);..PARAMETER\n-00006080: 530a 2020 2020 2053 4f43 4b45 5420 2020 S. SOCKET \n-00006090: 2020 696e 2020 2020 2020 2020 2049 6e69 in Ini\n-000060a0: 7469 616c 697a 6564 2061 6e64 2063 6f6e tialized and con\n-000060b0: 6e65 6374 6564 2073 6f63 6b65 7420 6f62 nected socket ob\n-000060c0: 6a65 6374 0a20 2020 2020 434f 554e 5420 ject. COUNT \n-000060d0: 2020 2020 2069 6e20 2020 2020 2020 2020 in \n-000060e0: 4e75 6d62 6572 206f 6620 4352 2f4c 4620 Number of CR/LF \n-000060f0: 7365 7175 656e 6365 7320 746f 2073 656e sequences to sen\n-00006100: 640a 0a44 4553 4352 4950 5449 4f4e 0a20 d..DESCRIPTION. \n-00006110: 2020 2020 5468 6973 2070 726f 6365 6475 This procedu\n-00006120: 7265 2073 656e 6473 206f 6e65 206f 7220 re sends one or \n-00006130: 6d6f 7265 2043 522f 4c46 2063 6f6d 6269 more CR/LF combi\n-00006140: 6e61 7469 6f6e 7320 746f 2074 6865 2070 nations to the p\n-00006150: 6565 722e 0a0a 4558 4345 5054 494f 4e53 eer...EXCEPTIONS\n-00006160: 0a20 2020 2020 e280 9843 6f6e 6e65 6374 . ...Connect\n-00006170: 696f 6e5f 436c 6f73 6564 e280 9950 6565 ion_Closed...Pee\n-00006180: 7220 6861 7320 7072 656d 6174 7572 656c r has prematurel\n-00006190: 7920 636c 6f73 6564 2074 6865 2063 6f6e y closed the con\n-000061a0: 6e65 6374 696f 6e0a 0a53 4545 2041 4c53 nection..SEE ALS\n-000061b0: 4f0a 2020 2020 202a 6e6f 7465 2050 7574 O. *note Put\n-000061c0: 2028 7072 6f63 6564 7572 6529 3a3a 2c0a (procedure)::,.\n-000061d0: 2020 2020 202a 6e6f 7465 2050 7574 5f4c *note Put_L\n-000061e0: 696e 6520 2870 726f 6365 6475 7265 293a ine (procedure):\n-000061f0: 3a2e 0a0a 1f0a 4669 6c65 3a20 6164 6173 :.....File: adas\n-00006200: 6f63 6b65 7473 2e69 6e66 6f2c 2020 4e6f ockets.info, No\n-00006210: 6465 3a20 5075 7420 2870 726f 6365 6475 de: Put (procedu\n-00006220: 7265 292c 2020 4e65 7874 3a20 5075 745f re), Next: Put_\n-00006230: 4c69 6e65 2028 7072 6f63 6564 7572 6529 Line (procedure)\n-00006240: 2c20 2050 7265 763a 204e 6577 5f4c 696e , Prev: New_Lin\n-00006250: 6520 2870 726f 6365 6475 7265 292c 2020 e (procedure), \n-00006260: 5570 3a20 4163 6365 7074 5f53 6f63 6b65 Up: Accept_Socke\n-00006270: 7420 2870 726f 6365 6475 7265 290a 0a50 t (procedure)..P\n-00006280: 7574 2028 7072 6f63 6564 7572 6529 0a2d ut (procedure).-\n-00006290: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 0a0a --------------..\n-000062a0: 5055 5250 4f53 450a 2020 2020 2053 656e PURPOSE. Sen\n-000062b0: 6420 6120 7374 7269 6e67 2074 6f20 6120 d a string to a \n-000062c0: 7265 6d6f 7465 2068 6f73 740a 5052 4f54 remote host.PROT\n-000062d0: 4f54 5950 450a 2020 2020 2020 2d2d 2053 OTYPE. -- S\n-000062e0: 6f63 6b65 7473 2e50 7574 3a20 7072 6f63 ockets.Put: proc\n-000062f0: 6564 7572 6520 5075 7420 2853 4f43 4b45 edure Put (SOCKE\n-00006300: 5420 3a20 536f 636b 6574 5f46 4427 436c T : Socket_FD'Cl\n-00006310: 6173 733b 0a20 2020 2020 2020 2020 2020 ass;. \n-00006320: 2020 2020 5354 5220 3a20 5374 7269 6e67 STR : String\n-00006330: 293b 0a0a 5041 5241 4d45 5445 5253 0a20 );..PARAMETERS. \n-00006340: 2020 2020 534f 434b 4554 2020 2020 2069 SOCKET i\n-00006350: 6e20 2020 2020 2020 2020 496e 6974 6961 n Initia\n-00006360: 6c69 7a65 6420 616e 6420 636f 6e6e 6563 lized and connec\n-00006370: 7465 6420 736f 636b 6574 206f 626a 6563 ted socket objec\n-00006380: 740a 2020 2020 2053 5452 2020 2020 2020 t. STR \n-00006390: 2020 696e 2020 2020 2020 2020 2053 7472 in Str\n-000063a0: 696e 6720 746f 2073 656e 640a 0a44 4553 ing to send..DES\n-000063b0: 4352 4950 5449 4f4e 0a20 2020 2020 5468 CRIPTION. Th\n-000063c0: 6973 2070 726f 6365 6475 7265 2073 656e is procedure sen\n-000063d0: 6473 2074 6865 2063 6f6e 7465 6e74 206f ds the content o\n-000063e0: 6620 5354 5220 6f76 6572 2061 6e20 6f75 f STR over an ou\n-000063f0: 7467 6f69 6e67 206f 720a 2020 2020 2069 tgoing or. i\n-00006400: 6e63 6f6d 696e 6720 736f 636b 6574 2e0a ncoming socket..\n-00006410: 0a45 5843 4550 5449 4f4e 530a 2020 2020 .EXCEPTIONS. \n-00006420: 20e2 8098 436f 6e6e 6563 7469 6f6e 5f43 ...Connection_C\n-00006430: 6c6f 7365 64e2 8099 5065 6572 2068 6173 losed...Peer has\n-00006440: 2070 7265 6d61 7475 7265 6c79 2063 6c6f prematurely clo\n-00006450: 7365 6420 7468 6520 636f 6e6e 6563 7469 sed the connecti\n-00006460: 6f6e 0a0a 5345 4520 414c 534f 0a20 2020 on..SEE ALSO. \n-00006470: 2020 2a6e 6f74 6520 4e65 775f 4c69 6e65 *note New_Line\n-00006480: 2028 7072 6f63 6564 7572 6529 3a3a 2c0a (procedure)::,.\n-00006490: 2020 2020 202a 6e6f 7465 2050 7574 5f4c *note Put_L\n-000064a0: 696e 6520 2870 726f 6365 6475 7265 293a ine (procedure):\n-000064b0: 3a2c 0a20 2020 2020 2a6e 6f74 6520 5365 :,. *note Se\n-000064c0: 6e64 2028 7072 6f63 6564 7572 6529 3a3a nd (procedure)::\n-000064d0: 2e0a 0a1f 0a46 696c 653a 2061 6461 736f .....File: adaso\n-000064e0: 636b 6574 732e 696e 666f 2c20 204e 6f64 ckets.info, Nod\n-000064f0: 653a 2050 7574 5f4c 696e 6520 2870 726f e: Put_Line (pro\n-00006500: 6365 6475 7265 292c 2020 4e65 7874 3a20 cedure), Next: \n-00006510: 5265 6365 6976 6520 2866 756e 6374 696f Receive (functio\n-00006520: 6e29 2c20 2050 7265 763a 2050 7574 2028 n), Prev: Put (\n-00006530: 7072 6f63 6564 7572 6529 2c20 2055 703a procedure), Up:\n-00006540: 2041 6363 6570 745f 536f 636b 6574 2028 Accept_Socket (\n-00006550: 7072 6f63 6564 7572 6529 0a0a 5075 745f procedure)..Put_\n-00006560: 4c69 6e65 2028 7072 6f63 6564 7572 6529 Line (procedure)\n-00006570: 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d .---------------\n-00006580: 2d2d 2d2d 2d0a 0a50 5552 504f 5345 0a20 -----..PURPOSE. \n-00006590: 2020 2020 5365 6e64 2061 2043 522f 4c46 Send a CR/LF\n-000065a0: 2074 6572 6d69 6e61 7465 6420 7374 7269 terminated stri\n-000065b0: 6e67 2074 6f20 6120 7265 6d6f 7465 2068 ng to a remote h\n-000065c0: 6f73 740a 5052 4f54 4f54 5950 450a 2020 ost.PROTOTYPE. \n-000065d0: 2020 2020 2d2d 2053 6f63 6b65 7473 2e50 -- Sockets.P\n-000065e0: 7574 5f4c 696e 653a 2070 726f 6365 6475 ut_Line: procedu\n-000065f0: 7265 2050 7574 5f4c 696e 6520 2853 4f43 re Put_Line (SOC\n-00006600: 4b45 5420 3a20 536f 636b 6574 5f46 4427 KET : Socket_FD'\n-00006610: 436c 6173 733b 0a20 2020 2020 2020 2020 Class;. \n-00006620: 2020 2020 2020 5354 5220 3a20 5374 7269 STR : Stri\n-00006630: 6e67 293b 0a0a 5041 5241 4d45 5445 5253 ng);..PARAMETERS\n-00006640: 0a20 2020 2020 534f 434b 4554 2020 2020 . SOCKET \n-00006650: 2069 6e20 2020 2020 2020 2020 496e 6974 in Init\n-00006660: 6961 6c69 7a65 6420 616e 6420 636f 6e6e ialized and conn\n-00006670: 6563 7465 6420 736f 636b 6574 206f 626a ected socket obj\n-00006680: 6563 740a 2020 2020 2053 5452 2020 2020 ect. STR \n-00006690: 2020 2020 696e 2020 2020 2020 2020 2053 in S\n-000066a0: 7472 696e 6720 746f 2073 656e 640a 0a44 tring to send..D\n-000066b0: 4553 4352 4950 5449 4f4e 0a20 2020 2020 ESCRIPTION. \n-000066c0: 5468 6973 2070 726f 6365 6475 7265 2073 This procedure s\n-000066d0: 656e 6473 2074 6865 2063 6f6e 7465 6e74 ends the content\n-000066e0: 206f 6620 5354 5220 706c 7573 2061 2043 of STR plus a C\n-000066f0: 522f 4c46 2063 6f6d 6269 6e61 7469 6f6e R/LF combination\n-00006700: 0a20 2020 2020 6f76 6572 2061 6e20 6f75 . over an ou\n-00006710: 7467 6f69 6e67 206f 7220 696e 636f 6d69 tgoing or incomi\n-00006720: 6e67 2073 6f63 6b65 742e 0a0a 4558 4345 ng socket...EXCE\n-00006730: 5054 494f 4e53 0a20 2020 2020 e280 9843 PTIONS. ...C\n-00006740: 6f6e 6e65 6374 696f 6e5f 436c 6f73 6564 onnection_Closed\n-00006750: e280 9950 6565 7220 6861 7320 7072 656d ...Peer has prem\n-00006760: 6174 7572 656c 7920 636c 6f73 6564 2074 aturely closed t\n-00006770: 6865 2063 6f6e 6e65 6374 696f 6e0a 0a53 he connection..S\n-00006780: 4545 2041 4c53 4f0a 2020 2020 202a 6e6f EE ALSO. *no\n-00006790: 7465 204e 6577 5f4c 696e 6520 2870 726f te New_Line (pro\n-000067a0: 6365 6475 7265 293a 3a2c 0a20 2020 2020 cedure)::,. \n-000067b0: 2a6e 6f74 6520 5075 7420 2870 726f 6365 *note Put (proce\n-000067c0: 6475 7265 293a 3a2c 0a20 2020 2020 2a6e dure)::,. *n\n-000067d0: 6f74 6520 5365 6e64 2028 7072 6f63 6564 ote Send (proced\n-000067e0: 7572 6529 3a3a 2e0a 0a1f 0a46 696c 653a ure)::.....File:\n-000067f0: 2061 6461 736f 636b 6574 732e 696e 666f adasockets.info\n-00006800: 2c20 204e 6f64 653a 2052 6563 6569 7665 , Node: Receive\n-00006810: 2028 6675 6e63 7469 6f6e 292c 2020 4e65 (function), Ne\n-00006820: 7874 3a20 5265 6365 6976 6520 2870 726f xt: Receive (pro\n-00006830: 6365 6475 7265 292c 2020 5072 6576 3a20 cedure), Prev: \n-00006840: 5075 745f 4c69 6e65 2028 7072 6f63 6564 Put_Line (proced\n-00006850: 7572 6529 2c20 2055 703a 2041 6363 6570 ure), Up: Accep\n-00006860: 745f 536f 636b 6574 2028 7072 6f63 6564 t_Socket (proced\n-00006870: 7572 6529 0a0a 5265 6365 6976 6520 2866 ure)..Receive (f\n-00006880: 756e 6374 696f 6e29 0a2d 2d2d 2d2d 2d2d unction).-------\n-00006890: 2d2d 2d2d 2d2d 2d2d 2d2d 2d0a 0a50 5552 -----------..PUR\n-000068a0: 504f 5345 0a20 2020 2020 5265 6365 6976 POSE. Receiv\n-000068b0: 6520 7261 7720 6461 7461 206f 7665 7220 e raw data over \n-000068c0: 6120 736f 636b 6574 0a50 524f 544f 5459 a socket.PROTOTY\n-000068d0: 5045 0a20 2020 2020 202d 2d20 536f 636b PE. -- Sock\n-000068e0: 6574 732e 5265 6365 6976 653a 2066 756e ets.Receive: fun\n-000068f0: 6374 696f 6e20 5265 6365 6976 6520 2853 ction Receive (S\n-00006900: 4f43 4b45 5420 3a20 536f 636b 6574 5f46 OCKET : Socket_F\n-00006910: 443b 0a20 2020 2020 2020 2020 2020 2020 D;. \n-00006920: 2020 4d41 5820 3a20 4164 612e 5374 7265 MAX : Ada.Stre\n-00006930: 616d 732e 5374 7265 616d 5f45 6c65 6d65 ams.Stream_Eleme\n-00006940: 6e74 5f43 6f75 6e74 203a 3d20 3430 3936 nt_Count := 4096\n-00006950: 290a 2020 2020 2020 2020 2020 2020 2020 ). \n-00006960: 2072 6574 7572 6e20 4164 612e 5374 7265 return Ada.Stre\n-00006970: 616d 732e 5374 7265 616d 5f45 6c65 6d65 ams.Stream_Eleme\n-00006980: 6e74 5f41 7272 6179 3b0a 0a50 4152 414d nt_Array;..PARAM\n-00006990: 4554 4552 530a 2020 2020 2053 4f43 4b45 ETERS. SOCKE\n-000069a0: 5420 2020 2020 696e 2020 2020 2020 2020 T in \n-000069b0: 2049 6e69 7469 616c 697a 6564 2061 6e64 Initialized and\n-000069c0: 2062 6f75 6e64 206f 7220 636f 6e6e 6563 bound or connec\n-000069d0: 7465 640a 2020 2020 2020 2020 2020 2020 ted. \n-000069e0: 2020 2020 2020 2020 2020 2020 2020 2073 s\n-000069f0: 6f63 6b65 7420 6f62 6a65 6374 0a20 2020 ocket object. \n-00006a00: 2020 4d41 5820 2020 2020 2020 2069 6e20 MAX in \n-00006a10: 2020 2020 2020 2020 4d61 7869 6d75 6d20 Maximum \n-00006a20: 6461 7461 206c 656e 6774 680a 0a52 4554 data length..RET\n-00006a30: 5552 4e20 5641 4c55 450a 2020 2020 2052 URN VALUE. R\n-00006a40: 6563 6569 7665 6420 7261 7720 6461 7461 eceived raw data\n-00006a50: 0a0a 4445 5343 5249 5054 494f 4e0a 2020 ..DESCRIPTION. \n-00006a60: 2020 2054 6869 7320 7072 6f63 6564 7572 This procedur\n-00006a70: 6520 7265 6365 6976 6573 2064 6174 6120 e receives data \n-00006a80: 6672 6f6d 2061 2062 6f75 6e64 2055 4450 from a bound UDP\n-00006a90: 2073 6f63 6b65 7420 6f72 2061 2063 6f6e socket or a con\n-00006aa0: 6e65 6374 6564 0a20 2020 2020 5443 5020 nected. TCP \n-00006ab0: 736f 636b 6574 2e20 204f 6e6c 7920 6f6e socket. Only on\n-00006ac0: 6520 7379 7374 656d 2063 616c 6c20 7769 e system call wi\n-00006ad0: 6c6c 2062 6520 7065 7266 6f72 6d65 643b ll be performed;\n-00006ae0: 2074 6869 7320 6675 6e63 7469 6f6e 0a20 this function. \n-00006af0: 2020 2020 7769 6c6c 2072 6574 7572 6e20 will return \n-00006b00: 7768 6174 6576 6572 2064 6174 6120 6861 whatever data ha\n-00006b10: 7320 6172 7269 7665 642e 2020 4e6f 7465 s arrived. Note\n-00006b20: 2074 6861 7420 696e 2047 4e41 5420 7468 that in GNAT th\n-00006b30: 650a 2020 2020 2073 6563 6f6e 6461 7279 e. secondary\n-00006b40: 2073 7461 636b 206d 6179 2062 6520 7573 stack may be us\n-00006b50: 6564 2074 6f20 7374 6f72 6520 7468 6520 ed to store the \n-00006b60: 6461 7461 2061 6e64 206d 6179 2072 6573 data and may res\n-00006b70: 756c 7420 696e 0a20 2020 2020 7374 6163 ult in. stac\n-00006b80: 6b20 7374 6f72 6167 6520 6578 6861 7573 k storage exhaus\n-00006b90: 7469 6f6e 2e0a 0a45 5843 4550 5449 4f4e tion...EXCEPTION\n-00006ba0: 530a 2020 2020 20e2 8098 436f 6e6e 6563 S. ...Connec\n-00006bb0: 7469 6f6e 5f43 6c6f 7365 64e2 8099 5065 tion_Closed...Pe\n-00006bc0: 6572 2068 6173 2063 6c6f 7365 6420 7468 er has closed th\n-00006bd0: 6520 636f 6e6e 6563 7469 6f6e 2062 6566 e connection bef\n-00006be0: 6f72 650a 2020 2020 2020 2020 2020 2020 ore. \n-00006bf0: 2020 2020 2020 2020 2020 2020 7365 6e64 send\n-00006c00: 696e 6720 616e 7920 6461 7461 0a0a 5345 ing any data..SE\n-00006c10: 4520 414c 534f 0a20 2020 2020 2a6e 6f74 E ALSO. *not\n-00006c20: 6520 5265 6365 6976 6520 2870 726f 6365 e Receive (proce\n-00006c30: 6475 7265 293a 3a2c 0a20 2020 2020 2a6e dure)::,. *n\n-00006c40: 6f74 6520 5265 6365 6976 655f 536f 6d65 ote Receive_Some\n-00006c50: 2028 7072 6f63 6564 7572 6529 3a3a 2c0a (procedure)::,.\n-00006c60: 2020 2020 202a 6e6f 7465 2047 6574 5f4c *note Get_L\n-00006c70: 696e 6520 2866 756e 6374 696f 6e29 3a3a ine (function)::\n-00006c80: 2c0a 2020 2020 202a 6e6f 7465 2047 6574 ,. *note Get\n-00006c90: 5f4c 696e 6520 2870 726f 6365 6475 7265 _Line (procedure\n-00006ca0: 293a 3a2e 0a0a 1f0a 4669 6c65 3a20 6164 )::.....File: ad\n-00006cb0: 6173 6f63 6b65 7473 2e69 6e66 6f2c 2020 asockets.info, \n-00006cc0: 4e6f 6465 3a20 5265 6365 6976 6520 2870 Node: Receive (p\n-00006cd0: 726f 6365 6475 7265 292c 2020 4e65 7874 rocedure), Next\n-00006ce0: 3a20 5265 6365 6976 655f 536f 6d65 2028 : Receive_Some (\n-00006cf0: 7072 6f63 6564 7572 6529 2c20 2050 7265 procedure), Pre\n-00006d00: 763a 2052 6563 6569 7665 2028 6675 6e63 v: Receive (func\n-00006d10: 7469 6f6e 292c 2020 5570 3a20 4163 6365 tion), Up: Acce\n-00006d20: 7074 5f53 6f63 6b65 7420 2870 726f 6365 pt_Socket (proce\n-00006d30: 6475 7265 290a 0a52 6563 6569 7665 2028 dure)..Receive (\n-00006d40: 7072 6f63 6564 7572 6529 0a2d 2d2d 2d2d procedure).-----\n-00006d50: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 0a0a --------------..\n-00006d60: 5055 5250 4f53 450a 2020 2020 2052 6563 PURPOSE. Rec\n-00006d70: 6569 7665 2072 6177 2064 6174 6120 6f76 eive raw data ov\n-00006d80: 6572 2061 2073 6f63 6b65 740a 5052 4f54 er a socket.PROT\n-00006d90: 4f54 5950 450a 2020 2020 2020 2d2d 2053 OTYPE. -- S\n-00006da0: 6f63 6b65 7473 2e52 6563 6569 7665 3a20 ockets.Receive: \n-00006db0: 7072 6f63 6564 7572 6520 5265 6365 6976 procedure Receiv\n-00006dc0: 6520 2853 4f43 4b45 5420 3a20 536f 636b e (SOCKET : Sock\n-00006dd0: 6574 5f46 4427 436c 6173 733b 0a20 2020 et_FD'Class;. \n-00006de0: 2020 2020 2020 2020 2020 2020 4441 5441 DATA\n-00006df0: 203a 206f 7574 2041 6461 2e53 7472 6561 : out Ada.Strea\n-00006e00: 6d73 2e53 7472 6561 6d5f 456c 656d 656e ms.Stream_Elemen\n-00006e10: 745f 4172 7261 7929 3b0a 0a50 4152 414d t_Array);..PARAM\n-00006e20: 4554 4552 530a 2020 2020 2053 4f43 4b45 ETERS. SOCKE\n-00006e30: 5420 2020 2020 696e 2020 2020 2020 2020 T in \n-00006e40: 2049 6e69 7469 616c 697a 6564 2061 6e64 Initialized and\n-00006e50: 2062 6f75 6e64 206f 7220 636f 6e6e 6563 bound or connec\n-00006e60: 7465 640a 2020 2020 2020 2020 2020 2020 ted. \n-00006e70: 2020 2020 2020 2020 2020 2020 2020 2073 s\n-00006e80: 6f63 6b65 7420 6f62 6a65 6374 0a20 2020 ocket object. \n-00006e90: 2020 4441 5441 2020 2020 2020 206f 7574 DATA out\n-00006ea0: 2020 2020 2020 2020 496e 636f 6d69 6e67 Incoming\n-00006eb0: 2064 6174 6120 6275 6666 6572 0a0a 4445 data buffer..DE\n-00006ec0: 5343 5249 5054 494f 4e0a 2020 2020 2054 SCRIPTION. T\n-00006ed0: 6869 7320 7072 6f63 6564 7572 6520 7265 his procedure re\n-00006ee0: 6365 6976 6573 2064 6174 6120 6672 6f6d ceives data from\n-00006ef0: 2061 2062 6f75 6e64 2055 4450 2073 6f63 a bound UDP soc\n-00006f00: 6b65 7420 6f72 2061 2063 6f6e 6e65 6374 ket or a connect\n-00006f10: 6564 0a20 2020 2020 5443 5020 736f 636b ed. TCP sock\n-00006f20: 6574 2e20 2049 7420 7769 6c6c 2062 6c6f et. It will blo\n-00006f30: 636b 2075 6e74 696c 2074 6865 2044 4154 ck until the DAT\n-00006f40: 4120 7265 6365 7074 696f 6e20 6275 6666 A reception buff\n-00006f50: 6572 2068 6173 2062 6565 6e0a 2020 2020 er has been. \n-00006f60: 2074 6f74 616c 6c79 2066 696c 6c65 642e totally filled.\n-00006f70: 0a0a 4558 4345 5054 494f 4e53 0a20 2020 ..EXCEPTIONS. \n-00006f80: 2020 e280 9843 6f6e 6e65 6374 696f 6e5f ...Connection_\n-00006f90: 436c 6f73 6564 e280 9950 6565 7220 6861 Closed...Peer ha\n-00006fa0: 7320 636c 6f73 6564 2074 6865 2063 6f6e s closed the con\n-00006fb0: 6e65 6374 696f 6e20 6265 666f 7265 0a20 nection before. \n-00006fc0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00006fd0: 2020 2020 2020 20e2 8098 4461 7461 274c ...Data'L\n-00006fe0: 656e 6774 68e2 8099 2062 7974 6573 0a20 ength... bytes. \n-00006ff0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00007000: 2020 2020 2020 2077 6572 6520 7265 6365 were rece\n-00007010: 6976 6564 0a0a 5345 4520 414c 534f 0a20 ived..SEE ALSO. \n-00007020: 2020 2020 2a6e 6f74 6520 4765 745f 4c69 *note Get_Li\n-00007030: 6e65 2028 6675 6e63 7469 6f6e 293a 3a2c ne (function)::,\n-00007040: 0a20 2020 2020 2a6e 6f74 6520 4765 745f . *note Get_\n-00007050: 4c69 6e65 2028 7072 6f63 6564 7572 6529 Line (procedure)\n-00007060: 3a3a 2c0a 2020 2020 202a 6e6f 7465 2052 ::,. *note R\n-00007070: 6563 6569 7665 2028 6675 6e63 7469 6f6e eceive (function\n-00007080: 293a 3a2c 0a20 2020 2020 2a6e 6f74 6520 )::,. *note \n-00007090: 5265 6365 6976 655f 536f 6d65 2028 7072 Receive_Some (pr\n-000070a0: 6f63 6564 7572 6529 3a3a 2e0a 0a1f 0a46 ocedure)::.....F\n-000070b0: 696c 653a 2061 6461 736f 636b 6574 732e ile: adasockets.\n-000070c0: 696e 666f 2c20 204e 6f64 653a 2052 6563 info, Node: Rec\n-000070d0: 6569 7665 5f53 6f6d 6520 2870 726f 6365 eive_Some (proce\n-000070e0: 6475 7265 292c 2020 4e65 7874 3a20 5365 dure), Next: Se\n-000070f0: 6e64 2028 7072 6f63 6564 7572 6529 2c20 nd (procedure), \n-00007100: 2050 7265 763a 2052 6563 6569 7665 2028 Prev: Receive (\n-00007110: 7072 6f63 6564 7572 6529 2c20 2055 703a procedure), Up:\n-00007120: 2041 6363 6570 745f 536f 636b 6574 2028 Accept_Socket (\n-00007130: 7072 6f63 6564 7572 6529 0a0a 5265 6365 procedure)..Rece\n-00007140: 6976 655f 536f 6d65 2028 7072 6f63 6564 ive_Some (proced\n-00007150: 7572 6529 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d ure).-----------\n-00007160: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d0a 0a50 -------------..P\n-00007170: 5552 504f 5345 0a20 2020 2020 5265 6365 URPOSE. Rece\n-00007180: 6976 6520 7261 7720 6461 7461 206f 7665 ive raw data ove\n-00007190: 7220 6120 736f 636b 6574 0a50 524f 544f r a socket.PROTO\n-000071a0: 5459 5045 0a20 2020 2020 202d 2d20 536f TYPE. -- So\n-000071b0: 636b 6574 732e 5265 6365 6976 655f 536f ckets.Receive_So\n-000071c0: 6d65 3a20 7072 6f63 6564 7572 6520 5265 me: procedure Re\n-000071d0: 6365 6976 655f 536f 6d65 0a20 2020 2020 ceive_Some. \n-000071e0: 2020 2020 2020 2020 2020 2853 4f43 4b45 (SOCKE\n-000071f0: 5420 3a20 536f 636b 6574 5f46 4427 436c T : Socket_FD'Cl\n-00007200: 6173 733b 0a20 2020 2020 2020 2020 2020 ass;. \n-00007210: 2020 2020 4441 5441 203a 206f 7574 2041 DATA : out A\n-00007220: 6461 2e53 7472 6561 6d73 2e53 7472 6561 da.Streams.Strea\n-00007230: 6d5f 456c 656d 656e 745f 4172 7261 793b m_Element_Array;\n-00007240: 0a20 2020 2020 2020 2020 2020 2020 2020 . \n-00007250: 4c41 5354 203a 206f 7574 2041 6461 2e53 LAST : out Ada.S\n-00007260: 7472 6561 6d73 2e53 7472 6561 6d5f 456c treams.Stream_El\n-00007270: 656d 656e 745f 4f66 6673 6574 293b 0a0a ement_Offset);..\n-00007280: 5041 5241 4d45 5445 5253 0a20 2020 2020 PARAMETERS. \n-00007290: 534f 434b 4554 2020 2020 2069 6e20 2020 SOCKET in \n-000072a0: 2020 2020 2020 496e 6974 6961 6c69 7a65 Initialize\n-000072b0: 6420 616e 6420 626f 756e 6420 6f72 2063 d and bound or c\n-000072c0: 6f6e 6e65 6374 6564 0a20 2020 2020 2020 onnected. \n-000072d0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000072e0: 2020 2020 736f 636b 6574 206f 626a 6563 socket objec\n-000072f0: 740a 2020 2020 2044 4154 4120 2020 2020 t. DATA \n-00007300: 2020 6f75 7420 2020 2020 2020 2049 6e63 out Inc\n-00007310: 6f6d 696e 6720 6461 7461 2062 7566 6665 oming data buffe\n-00007320: 720a 2020 2020 204c 4153 5420 2020 2020 r. LAST \n-00007330: 2020 6f75 7420 2020 2020 2020 2049 6e64 out Ind\n-00007340: 6578 206f 6620 6c61 7374 2065 6c65 6d65 ex of last eleme\n-00007350: 6e74 2070 6c61 6365 6420 696e 746f 2044 nt placed into D\n-00007360: 4154 410a 0a44 4553 4352 4950 5449 4f4e ATA..DESCRIPTION\n-00007370: 0a20 2020 2020 5468 6973 2070 726f 6365 . This proce\n-00007380: 6475 7265 2072 6563 6569 7665 7320 6461 dure receives da\n-00007390: 7461 2066 726f 6d20 6120 626f 756e 6420 ta from a bound \n-000073a0: 5544 5020 736f 636b 6574 206f 7220 6120 UDP socket or a \n-000073b0: 636f 6e6e 6563 7465 640a 2020 2020 2054 connected. T\n-000073c0: 4350 2073 6f63 6b65 742e 2020 4173 2073 CP socket. As s\n-000073d0: 6f6f 6e20 6173 2061 7420 6c65 6173 7420 oon as at least \n-000073e0: 6f6e 6520 6279 7465 2068 6173 2062 6565 one byte has bee\n-000073f0: 6e20 7265 6164 2c20 6974 2072 6574 7572 n read, it retur\n-00007400: 6e73 0a20 2020 2020 7769 7468 204c 4153 ns. with LAS\n-00007410: 5420 7365 7420 746f 2074 6865 2069 6e64 T set to the ind\n-00007420: 6578 206f 6620 7468 6520 6c61 7465 7374 ex of the latest\n-00007430: 2077 7269 7474 656e 2065 6c65 6d65 6e74 written element\n-00007440: 206f 6620 4441 5441 2e0a 0a45 5843 4550 of DATA...EXCEP\n-00007450: 5449 4f4e 530a 2020 2020 20e2 8098 436f TIONS. ...Co\n-00007460: 6e6e 6563 7469 6f6e 5f43 6c6f 7365 64e2 nnection_Closed.\n-00007470: 8099 5065 6572 2068 6173 2063 6c6f 7365 ..Peer has close\n-00007480: 6420 7468 6520 636f 6e6e 6563 7469 6f6e d the connection\n-00007490: 2062 6566 6f72 650a 2020 2020 2020 2020 before. \n-000074a0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000074b0: 7365 6e64 696e 6720 616e 7920 6461 7461 sending any data\n-000074c0: 0a0a 5345 4520 414c 534f 0a20 2020 2020 ..SEE ALSO. \n-000074d0: 2a6e 6f74 6520 4765 745f 4c69 6e65 2028 *note Get_Line (\n-000074e0: 6675 6e63 7469 6f6e 293a 3a2c 0a20 2020 function)::,. \n-000074f0: 2020 2a6e 6f74 6520 4765 745f 4c69 6e65 *note Get_Line\n-00007500: 2028 7072 6f63 6564 7572 6529 3a3a 2c0a (procedure)::,.\n-00007510: 2020 2020 202a 6e6f 7465 2052 6563 6569 *note Recei\n-00007520: 7665 2028 6675 6e63 7469 6f6e 293a 3a2c ve (function)::,\n-00007530: 0a20 2020 2020 2a6e 6f74 6520 5265 6365 . *note Rece\n-00007540: 6976 6520 2870 726f 6365 6475 7265 293a ive (procedure):\n-00007550: 3a2e 0a0a 1f0a 4669 6c65 3a20 6164 6173 :.....File: adas\n-00007560: 6f63 6b65 7473 2e69 6e66 6f2c 2020 4e6f ockets.info, No\n-00007570: 6465 3a20 5365 6e64 2028 7072 6f63 6564 de: Send (proced\n-00007580: 7572 6529 2c20 204e 6578 743a 2053 6574 ure), Next: Set\n-00007590: 5f42 7566 6665 7220 2870 726f 6365 6475 _Buffer (procedu\n-000075a0: 7265 292c 2020 5072 6576 3a20 5265 6365 re), Prev: Rece\n-000075b0: 6976 655f 536f 6d65 2028 7072 6f63 6564 ive_Some (proced\n-000075c0: 7572 6529 2c20 2055 703a 2041 6363 6570 ure), Up: Accep\n-000075d0: 745f 536f 636b 6574 2028 7072 6f63 6564 t_Socket (proced\n-000075e0: 7572 6529 0a0a 5365 6e64 2028 7072 6f63 ure)..Send (proc\n-000075f0: 6564 7572 6529 0a2d 2d2d 2d2d 2d2d 2d2d edure).---------\n-00007600: 2d2d 2d2d 2d2d 2d0a 0a50 5552 504f 5345 -------..PURPOSE\n-00007610: 0a20 2020 2020 5365 6e64 2072 6177 2064 . Send raw d\n-00007620: 6174 6120 6f76 6572 2061 2073 6f63 6b65 ata over a socke\n-00007630: 740a 5052 4f54 4f54 5950 450a 2020 2020 t.PROTOTYPE. \n-00007640: 2020 2d2d 2053 6f63 6b65 7473 2e53 656e -- Sockets.Sen\n-00007650: 643a 2070 726f 6365 6475 7265 2053 656e d: procedure Sen\n-00007660: 6420 2853 4f43 4b45 5420 3a20 536f 636b d (SOCKET : Sock\n-00007670: 6574 5f46 443b 0a20 2020 2020 2020 2020 et_FD;. \n-00007680: 2020 2020 2020 4441 5441 203a 206f 7574 DATA : out\n-00007690: 2041 6461 2e53 7472 6561 6d73 2e53 7472 Ada.Streams.Str\n-000076a0: 6561 6d5f 456c 656d 656e 745f 4172 7261 eam_Element_Arra\n-000076b0: 7929 3b0a 0a50 4152 414d 4554 4552 530a y);..PARAMETERS.\n-000076c0: 2020 2020 2053 4f43 4b45 5420 2020 2020 SOCKET \n-000076d0: 696e 2020 2020 2020 2020 2049 6e69 7469 in Initi\n-000076e0: 616c 697a 6564 2061 6e64 2063 6f6e 6e65 alized and conne\n-000076f0: 6374 6564 2073 6f63 6b65 7420 6f62 6a65 cted socket obje\n-00007700: 6374 0a20 2020 2020 4441 5441 2020 2020 ct. DATA \n-00007710: 2020 206f 7574 2020 2020 2020 2020 4461 out Da\n-00007720: 7461 2074 6f20 6265 2073 656e 740a 0a44 ta to be sent..D\n-00007730: 4553 4352 4950 5449 4f4e 0a20 2020 2020 ESCRIPTION. \n-00007740: 5468 6973 2070 726f 6365 6475 7265 2073 This procedure s\n-00007750: 656e 6473 2064 6174 6120 6f76 6572 2061 ends data over a\n-00007760: 2063 6f6e 6e65 6374 6564 206f 7574 676f connected outgo\n-00007770: 696e 6720 736f 636b 6574 206f 7220 6f76 ing socket or ov\n-00007780: 6572 0a20 2020 2020 616e 2069 6e63 6f6d er. an incom\n-00007790: 696e 6720 736f 636b 6574 2e0a 0a45 5843 ing socket...EXC\n-000077a0: 4550 5449 4f4e 530a 2020 2020 20e2 8098 EPTIONS. ...\n-000077b0: 436f 6e6e 6563 7469 6f6e 5f43 6c6f 7365 Connection_Close\n-000077c0: 64e2 8099 5065 6572 2068 6173 2070 7265 d...Peer has pre\n-000077d0: 6d61 7475 7265 6c79 2063 6c6f 7365 6420 maturely closed \n-000077e0: 7468 6520 636f 6e6e 6563 7469 6f6e 0a0a the connection..\n-000077f0: 5345 4520 414c 534f 0a20 2020 2020 2a6e SEE ALSO. *n\n-00007800: 6f74 6520 5075 7420 2870 726f 6365 6475 ote Put (procedu\n-00007810: 7265 293a 3a2c 0a20 2020 2020 2a6e 6f74 re)::,. *not\n-00007820: 6520 5075 745f 4c69 6e65 2028 7072 6f63 e Put_Line (proc\n-00007830: 6564 7572 6529 3a3a 2e0a 0a1f 0a46 696c edure)::.....Fil\n-00007840: 653a 2061 6461 736f 636b 6574 732e 696e e: adasockets.in\n-00007850: 666f 2c20 204e 6f64 653a 2053 6574 5f42 fo, Node: Set_B\n-00007860: 7566 6665 7220 2870 726f 6365 6475 7265 uffer (procedure\n-00007870: 292c 2020 4e65 7874 3a20 5365 7473 6f63 ), Next: Setsoc\n-00007880: 6b6f 7074 2028 7072 6f63 6564 7572 6529 kopt (procedure)\n-00007890: 2c20 2050 7265 763a 2053 656e 6420 2870 , Prev: Send (p\n-000078a0: 726f 6365 6475 7265 292c 2020 5570 3a20 rocedure), Up: \n-000078b0: 4163 6365 7074 5f53 6f63 6b65 7420 2870 Accept_Socket (p\n-000078c0: 726f 6365 6475 7265 290a 0a53 6574 5f42 rocedure)..Set_B\n-000078d0: 7566 6665 7220 2870 726f 6365 6475 7265 uffer (procedure\n-000078e0: 290a 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ).--------------\n-000078f0: 2d2d 2d2d 2d2d 2d2d 0a0a 5055 5250 4f53 --------..PURPOS\n-00007900: 450a 2020 2020 2049 6e73 7461 6c6c 2061 E. Install a\n-00007910: 206c 696e 652d 6f72 6965 6e74 6564 2062 line-oriented b\n-00007920: 7566 6665 7220 6f66 2074 6865 2073 6f63 uffer of the soc\n-00007930: 6b65 7420 6f62 6a65 6374 0a50 524f 544f ket object.PROTO\n-00007940: 5459 5045 0a20 2020 2020 202d 2d20 536f TYPE. -- So\n-00007950: 636b 6574 732e 5365 745f 4275 6666 6572 ckets.Set_Buffer\n-00007960: 3a20 7072 6f63 6564 7572 6520 5365 745f : procedure Set_\n-00007970: 4275 6666 6572 0a20 2020 2020 2020 2020 Buffer. \n-00007980: 2020 2020 2020 2853 4f43 4b45 5420 3a20 (SOCKET : \n-00007990: 536f 636b 6574 5f46 4427 436c 6173 733b Socket_FD'Class;\n-000079a0: 204c 454e 4754 4820 3a20 506f 7369 7469 LENGTH : Positi\n-000079b0: 7665 203a 3d20 3135 3030 293b 0a0a 5041 ve := 1500);..PA\n-000079c0: 5241 4d45 5445 5253 0a20 2020 2020 534f RAMETERS. SO\n-000079d0: 434b 4554 2020 2020 2069 6e20 2020 2020 CKET in \n-000079e0: 2020 2020 496e 6974 6961 6c69 7a65 6420 Initialized \n-000079f0: 616e 6420 636f 6e6e 6563 7465 6420 736f and connected so\n-00007a00: 636b 6574 206f 626a 6563 740a 2020 2020 cket object. \n-00007a10: 204c 454e 4754 4820 2020 2020 696e 2020 LENGTH in \n-00007a20: 2020 2020 2020 2053 697a 6520 696e 2062 Size in b\n-00007a30: 7974 6573 206f 6620 7468 6520 6e65 776c ytes of the newl\n-00007a40: 7920 696e 7374 616c 6c65 640a 2020 2020 y installed. \n-00007a50: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00007a60: 2020 2020 2020 2062 7566 6665 720a 0a44 buffer..D\n-00007a70: 4553 4352 4950 5449 4f4e 0a20 2020 2020 ESCRIPTION. \n-00007a80: 5468 6973 2070 726f 6365 6475 7265 2070 This procedure p\n-00007a90: 7574 7320 7468 6520 736f 636b 6574 206f uts the socket o\n-00007aa0: 626a 6563 7420 696e 2062 7566 6665 7265 bject in buffere\n-00007ab0: 6420 6d6f 6465 2e20 2049 6620 7468 650a d mode. If the.\n-00007ac0: 2020 2020 2073 6f63 6b65 7420 7761 7320 socket was \n-00007ad0: 616c 7265 6164 7920 6275 6666 6572 6564 already buffered\n-00007ae0: 2c20 7468 6520 636f 6e74 656e 7420 6f66 , the content of\n-00007af0: 2074 6865 2070 7265 7669 6f75 7320 6275 the previous bu\n-00007b00: 6666 6572 0a20 2020 2020 7769 6c6c 2062 ffer. will b\n-00007b10: 6520 6c6f 7374 2e20 2054 6865 2062 7566 e lost. The buf\n-00007b20: 6665 7265 6420 6d6f 6465 206f 6e6c 7920 fered mode only \n-00007b30: 6166 6665 6374 7320 6368 6172 6163 7465 affects characte\n-00007b40: 722d 2061 6e64 0a20 2020 2020 6c69 6e65 r- and. line\n-00007b50: 2d6f 7269 656e 7465 6420 7265 6164 206f -oriented read o\n-00007b60: 7065 7261 7469 6f6e 2073 7563 6820 6173 peration such as\n-00007b70: 202a 6e6f 7465 2047 6574 2028 6675 6e63 *note Get (func\n-00007b80: 7469 6f6e 293a 3a2c 202a 6e6f 7465 0a20 tion)::, *note. \n-00007b90: 2020 2020 4765 745f 4368 6172 2028 6675 Get_Char (fu\n-00007ba0: 6e63 7469 6f6e 293a 3a2c 2061 6e64 202a nction)::, and *\n-00007bb0: 6e6f 7465 2047 6574 5f4c 696e 6520 2866 note Get_Line (f\n-00007bc0: 756e 6374 696f 6e29 3a3a 2e20 204f 7468 unction)::. Oth\n-00007bd0: 6572 0a20 2020 2020 7265 6365 7074 696f er. receptio\n-00007be0: 6e20 7375 6270 726f 6772 616d 7320 7769 n subprograms wi\n-00007bf0: 6c6c 206e 6f74 2066 756e 6374 696f 6e20 ll not function \n-00007c00: 7072 6f70 6572 6c79 2069 6620 6275 6666 properly if buff\n-00007c10: 6572 6564 206d 6f64 650a 2020 2020 2069 ered mode. i\n-00007c20: 7320 7573 6564 2061 7420 7468 6520 7361 s used at the sa\n-00007c30: 6d65 2074 696d 652e 0a0a 2020 2020 2054 me time... T\n-00007c40: 6865 2073 697a 6520 6f66 2074 6865 2062 he size of the b\n-00007c50: 7566 6665 7220 6861 7320 746f 2062 6520 uffer has to be \n-00007c60: 6772 6561 7465 7220 7468 616e 2074 6865 greater than the\n-00007c70: 2062 6967 6765 7374 2070 6f73 7369 626c biggest possibl\n-00007c80: 650a 2020 2020 2070 6163 6b65 7420 7365 e. packet se\n-00007c90: 6e74 2062 7920 7468 6520 7265 6d6f 7465 nt by the remote\n-00007ca0: 2068 6f73 742c 206f 7468 6572 7769 7365 host, otherwise\n-00007cb0: 2064 6174 6120 6c6f 7373 206d 6179 206f data loss may o\n-00007cc0: 6363 7572 2e0a 0a53 4545 2041 4c53 4f0a ccur...SEE ALSO.\n-00007cd0: 2020 2020 202a 6e6f 7465 2055 6e73 6574 *note Unset\n-00007ce0: 5f42 7566 6665 7220 2870 726f 6365 6475 _Buffer (procedu\n-00007cf0: 7265 293a 3a2e 0a0a 1f0a 4669 6c65 3a20 re)::.....File: \n-00007d00: 6164 6173 6f63 6b65 7473 2e69 6e66 6f2c adasockets.info,\n-00007d10: 2020 4e6f 6465 3a20 5365 7473 6f63 6b6f Node: Setsocko\n-00007d20: 7074 2028 7072 6f63 6564 7572 6529 2c20 pt (procedure), \n-00007d30: 204e 6578 743a 2053 6875 7464 6f77 6e20 Next: Shutdown \n-00007d40: 2870 726f 6365 6475 7265 292c 2020 5072 (procedure), Pr\n-00007d50: 6576 3a20 5365 745f 4275 6666 6572 2028 ev: Set_Buffer (\n-00007d60: 7072 6f63 6564 7572 6529 2c20 2055 703a procedure), Up:\n-00007d70: 2041 6363 6570 745f 536f 636b 6574 2028 Accept_Socket (\n-00007d80: 7072 6f63 6564 7572 6529 0a0a 5365 7473 procedure)..Sets\n-00007d90: 6f63 6b6f 7074 2028 7072 6f63 6564 7572 ockopt (procedur\n-00007da0: 6529 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d e).-------------\n-00007db0: 2d2d 2d2d 2d2d 2d2d 2d0a 0a50 5552 504f ---------..PURPO\n-00007dc0: 5345 0a20 2020 2020 5365 7420 6120 736f SE. Set a so\n-00007dd0: 636b 6574 206f 7074 696f 6e0a 5052 4f54 cket option.PROT\n-00007de0: 4f54 5950 450a 2020 2020 2020 2d2d 2053 OTYPE. -- S\n-00007df0: 6f63 6b65 7473 2e53 6574 736f 636b 6f70 ockets.Setsockop\n-00007e00: 743a 2070 726f 6365 6475 7265 2053 6574 t: procedure Set\n-00007e10: 736f 636b 6f70 7420 2853 4f43 4b45 5420 sockopt (SOCKET \n-00007e20: 3a20 536f 636b 6574 5f46 443b 0a20 2020 : Socket_FD;. \n-00007e30: 2020 2020 2020 2020 2020 2020 4c45 5645 LEVE\n-00007e40: 4c20 3a20 536f 636b 6574 5f4c 6576 656c L : Socket_Level\n-00007e50: 203a 3d20 534f 4c5f 534f 434b 4554 3b0a := SOL_SOCKET;.\n-00007e60: 2020 2020 2020 2020 2020 2020 2020 204f O\n-00007e70: 5054 4e41 4d45 203a 2053 6f63 6b65 745f PTNAME : Socket_\n-00007e80: 4f70 7469 6f6e 3b20 4f50 5456 414c 203a Option; OPTVAL :\n-00007e90: 2049 6e74 6567 6572 293b 0a0a 5041 5241 Integer);..PARA\n-00007ea0: 4d45 5445 5253 0a20 2020 2020 534f 434b METERS. SOCK\n-00007eb0: 4554 2020 2020 2069 6e20 2020 2020 2020 ET in \n-00007ec0: 2020 496e 6974 6961 6c69 7a65 6420 616e Initialized an\n-00007ed0: 6420 626f 756e 6420 736f 636b 6574 206f d bound socket o\n-00007ee0: 626a 6563 740a 2020 2020 204c 4556 454c bject. LEVEL\n-00007ef0: 2020 2020 2020 696e 2020 2020 2020 2020 in \n-00007f00: 2050 726f 746f 636f 6c20 6c65 7665 6c0a Protocol level.\n-00007f10: 2020 2020 204f 5054 4e41 4d45 2020 2020 OPTNAME \n-00007f20: 696e 2020 2020 2020 2020 204f 7074 696f in Optio\n-00007f30: 6e20 6e61 6d65 0a20 2020 2020 4f50 5456 n name. OPTV\n-00007f40: 414c 2020 2020 2069 6e20 2020 2020 2020 AL in \n-00007f50: 2020 4f70 7469 6f6e 2076 616c 7565 0a0a Option value..\n-00007f60: 4445 5343 5249 5054 494f 4e0a 2020 2020 DESCRIPTION. \n-00007f70: 2054 6869 7320 7072 6f63 6564 7572 6520 This procedure \n-00007f80: 7365 7473 206f 7074 696f 6e73 2061 7070 sets options app\n-00007f90: 6c69 6361 626c 6520 746f 2061 2073 6f63 licable to a soc\n-00007fa0: 6b65 742e 2020 506c 6561 7365 2073 6565 ket. Please see\n-00007fb0: 0a20 2020 2020 796f 7572 206f 7065 7261 . your opera\n-00007fc0: 7469 6e67 2073 7973 7465 6d20 6d61 6e75 ting system manu\n-00007fd0: 616c 2066 6f72 2075 7361 626c 6520 6c65 al for usable le\n-00007fe0: 7665 6c73 2061 6e64 206f 7074 696f 6e73 vels and options\n-00007ff0: 2e0a 0a20 2020 2020 5477 6f20 6c65 7665 ... Two leve\n-00008000: 6c73 2061 7265 2064 6566 696e 6564 3a20 ls are defined: \n-00008010: e280 9853 4f4c 5f53 4f43 4b45 54e2 8099 ...SOL_SOCKET...\n-00008020: 2028 7468 6520 6465 6661 756c 7429 2061 (the default) a\n-00008030: 6e64 0a20 2020 2020 e280 9849 5050 524f nd. ...IPPRO\n-00008040: 544f 5f49 50e2 8099 2e20 2054 6865 206f TO_IP.... The o\n-00008050: 7074 696f 6e73 2061 7265 20e2 8098 534f ptions are ...SO\n-00008060: 5f52 4555 5345 4144 4452 e280 992c 20e2 _REUSEADDR..., .\n-00008070: 8098 534f 5f52 4555 5345 504f 5254 e280 ..SO_REUSEPORT..\n-00008080: 992c 0a20 2020 2020 e280 9849 505f 4d55 .,. ...IP_MU\n-00008090: 4c54 4943 4153 545f 5454 4ce2 8099 2c20 LTICAST_TTL..., \n-000080a0: e280 9849 505f 4144 445f 4d45 4d42 4552 ...IP_ADD_MEMBER\n-000080b0: 5348 4950 e280 992c 20e2 8098 4950 5f44 SHIP..., ...IP_D\n-000080c0: 524f 505f 4d45 4d42 4552 5348 4950 e280 ROP_MEMBERSHIP..\n-000080d0: 992c 0a20 2020 2020 e280 9849 505f 4d55 .,. ...IP_MU\n-000080e0: 4c54 4943 4153 545f 4c4f 4f50 e280 992c LTICAST_LOOP...,\n-000080f0: 20e2 8098 534f 5f53 4e44 4255 46e2 8099 ...SO_SNDBUF...\n-00008100: 2061 6e64 20e2 8098 4950 5f52 4356 4255 and ...IP_RCVBU\n-00008110: 46e2 8099 2e0a 0a20 2020 2020 4e6f 7465 F...... Note\n-00008120: 2074 6861 7420 756e 6c69 6b65 2074 6865 that unlike the\n-00008130: 6972 2043 206c 616e 6775 6167 6520 636f ir C language co\n-00008140: 756e 7465 7270 6172 742c 20e2 8098 4765 unterpart, ...Ge\n-00008150: 7473 6f63 6b6f 7074 e280 9920 616e 640a tsockopt... and.\n-00008160: 2020 2020 20e2 8098 5365 7473 6f63 6b6f ...Setsocko\n-00008170: 7074 e280 9920 646f 206e 6f74 2072 6571 pt... do not req\n-00008180: 7569 7265 2061 6e20 6578 7472 6120 7061 uire an extra pa\n-00008190: 7261 6d65 7465 7220 7265 7072 6573 656e rameter represen\n-000081a0: 7469 6e67 2074 6865 0a20 2020 2020 6c65 ting the. le\n-000081b0: 6e67 7468 2069 6e20 6279 7465 7320 6f66 ngth in bytes of\n-000081c0: 2074 6865 206f 7074 696f 6e20 7661 6c75 the option valu\n-000081d0: 652e 2020 4164 6153 6f63 6b65 7473 206b e. AdaSockets k\n-000081e0: 6e6f 7773 2074 6865 2072 6967 6874 0a20 nows the right. \n-000081f0: 2020 2020 7369 7a65 2066 6f72 2065 7665 size for eve\n-00008200: 7279 206f 7074 696f 6e2e 0a0a 5345 4520 ry option...SEE \n-00008210: 414c 534f 0a20 2020 2020 2a6e 6f74 6520 ALSO. *note \n-00008220: 4765 7473 6f63 6b6f 7074 2028 7072 6f63 Getsockopt (proc\n-00008230: 6564 7572 6529 3a3a 2e0a 0a1f 0a46 696c edure)::.....Fil\n-00008240: 653a 2061 6461 736f 636b 6574 732e 696e e: adasockets.in\n-00008250: 666f 2c20 204e 6f64 653a 2053 6875 7464 fo, Node: Shutd\n-00008260: 6f77 6e20 2870 726f 6365 6475 7265 292c own (procedure),\n-00008270: 2020 4e65 7874 3a20 536f 636b 6574 2028 Next: Socket (\n-00008280: 7072 6f63 6564 7572 6529 2c20 2050 7265 procedure), Pre\n-00008290: 763a 2053 6574 736f 636b 6f70 7420 2870 v: Setsockopt (p\n-000082a0: 726f 6365 6475 7265 292c 2020 5570 3a20 rocedure), Up: \n-000082b0: 4163 6365 7074 5f53 6f63 6b65 7420 2870 Accept_Socket (p\n-000082c0: 726f 6365 6475 7265 290a 0a53 6875 7464 rocedure)..Shutd\n-000082d0: 6f77 6e20 2870 726f 6365 6475 7265 290a own (procedure).\n-000082e0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n-000082f0: 2d2d 2d2d 0a0a 5055 5250 4f53 450a 2020 ----..PURPOSE. \n-00008300: 2020 2053 6875 7464 6f77 6e20 6120 736f Shutdown a so\n-00008310: 636b 6574 0a50 524f 544f 5459 5045 0a20 cket.PROTOTYPE. \n-00008320: 2020 2020 202d 2d20 536f 636b 6574 732e -- Sockets.\n-00008330: 5368 7574 646f 776e 3a20 7072 6f63 6564 Shutdown: proced\n-00008340: 7572 6520 5368 7574 646f 776e 0a20 2020 ure Shutdown. \n-00008350: 2020 2020 2020 2020 2020 2020 2853 4f43 (SOC\n-00008360: 4b45 5420 3a20 696e 206f 7574 2053 6f63 KET : in out Soc\n-00008370: 6b65 745f 4644 3b20 484f 5720 3a20 5368 ket_FD; HOW : Sh\n-00008380: 7574 646f 776e 5f54 7970 6520 3a3d 2042 utdown_Type := B\n-00008390: 6f74 6829 3b0a 0a50 4152 414d 4554 4552 oth);..PARAMETER\n-000083a0: 530a 2020 2020 2053 4f43 4b45 5420 2020 S. SOCKET \n-000083b0: 2020 696e 206f 7574 2020 2020 2053 6f63 in out Soc\n-000083c0: 6b65 7420 6f62 6a65 6374 2074 6f20 7368 ket object to sh\n-000083d0: 7574 646f 776e 0a20 2020 2020 484f 5720 utdown. HOW \n-000083e0: 2020 2020 2020 2069 6e20 2020 2020 2020 in \n-000083f0: 2020 4469 7265 6374 696f 6e20 746f 2073 Direction to s\n-00008400: 6875 7464 6f77 6e0a 0a44 4553 4352 4950 hutdown..DESCRIP\n-00008410: 5449 4f4e 0a20 2020 2020 5468 6973 2070 TION. This p\n-00008420: 726f 6365 6475 7265 2073 6875 7464 6f77 rocedure shutdow\n-00008430: 6e73 2065 6974 6865 7220 6469 7265 6374 ns either direct\n-00008440: 696f 6e20 6f66 2074 6865 2073 6f63 6b65 ion of the socke\n-00008450: 742e 2020 484f 5720 6361 6e0a 2020 2020 t. HOW can. \n-00008460: 2074 616b 6520 7468 6520 7661 6c75 6520 take the value \n-00008470: e280 9853 656e 64e2 8099 2c20 e280 9852 ...Send..., ...R\n-00008480: 6563 6569 7665 e280 9920 6f72 20e2 8098 eceive... or ...\n-00008490: 426f 7468 e280 992e 0a0a 5345 4520 414c Both......SEE AL\n-000084a0: 534f 0a20 2020 2020 2a6e 6f74 6520 536f SO. *note So\n-000084b0: 636b 6574 2028 7072 6f63 6564 7572 6529 cket (procedure)\n-000084c0: 3a3a 2e0a 0a1f 0a46 696c 653a 2061 6461 ::.....File: ada\n-000084d0: 736f 636b 6574 732e 696e 666f 2c20 204e sockets.info, N\n-000084e0: 6f64 653a 2053 6f63 6b65 7420 2870 726f ode: Socket (pro\n-000084f0: 6365 6475 7265 292c 2020 4e65 7874 3a20 cedure), Next: \n-00008500: 556e 7365 745f 4275 6666 6572 2028 7072 Unset_Buffer (pr\n-00008510: 6f63 6564 7572 6529 2c20 2050 7265 763a ocedure), Prev:\n-00008520: 2053 6875 7464 6f77 6e20 2870 726f 6365 Shutdown (proce\n-00008530: 6475 7265 292c 2020 5570 3a20 4163 6365 dure), Up: Acce\n-00008540: 7074 5f53 6f63 6b65 7420 2870 726f 6365 pt_Socket (proce\n-00008550: 6475 7265 290a 0a53 6f63 6b65 7420 2870 dure)..Socket (p\n-00008560: 726f 6365 6475 7265 290a 2d2d 2d2d 2d2d rocedure).------\n-00008570: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 0a0a 5055 ------------..PU\n-00008580: 5250 4f53 450a 2020 2020 2043 7265 6174 RPOSE. Creat\n-00008590: 6520 6120 736f 636b 6574 206f 6620 7468 e a socket of th\n-000085a0: 6520 6769 7665 6e20 6d6f 6465 0a50 524f e given mode.PRO\n-000085b0: 544f 5459 5045 0a20 2020 2020 202d 2d20 TOTYPE. -- \n-000085c0: 536f 636b 6574 732e 536f 636b 6574 3a20 Sockets.Socket: \n-000085d0: 7072 6f63 6564 7572 6520 536f 636b 6574 procedure Socket\n-000085e0: 2028 534f 434b 4554 203a 206f 7574 2053 (SOCKET : out S\n-000085f0: 6f63 6b65 745f 4644 3b0a 2020 2020 2020 ocket_FD;. \n-00008600: 2020 2020 2020 2020 2044 4f4d 4149 4e20 DOMAIN \n-00008610: 3a20 536f 636b 6574 5f44 6f6d 6169 6e20 : Socket_Domain \n-00008620: 3a3d 2050 465f 494e 4554 3b0a 2020 2020 := PF_INET;. \n-00008630: 2020 2020 2020 2020 2020 2054 5950 203a TYP :\n-00008640: 2053 6f63 6b65 745f 5479 7065 203a 3d20 Socket_Type := \n-00008650: 534f 434b 5f53 5452 4541 4d29 3b0a 0a50 SOCK_STREAM);..P\n-00008660: 4152 414d 4554 4552 530a 2020 2020 2053 ARAMETERS. S\n-00008670: 4f43 4b45 5420 2020 2020 6f75 7420 2020 OCKET out \n-00008680: 2020 2020 2053 6f63 6b65 7420 6f62 6a65 Socket obje\n-00008690: 6374 2074 6f20 696e 6974 6961 6c69 7a65 ct to initialize\n-000086a0: 0a20 2020 2020 444f 4d41 494e 2020 2020 . DOMAIN \n-000086b0: 2069 6e20 2020 2020 2020 2020 5072 6f74 in Prot\n-000086c0: 6f63 6f6c 2066 616d 696c 790a 2020 2020 ocol family. \n-000086d0: 2054 5950 2020 2020 2020 2020 696e 2020 TYP in \n-000086e0: 2020 2020 2020 204b 696e 6420 6f66 2073 Kind of s\n-000086f0: 6f63 6b65 7473 0a0a 4445 5343 5249 5054 ockets..DESCRIPT\n-00008700: 494f 4e0a 2020 2020 2054 6869 7320 7072 ION. This pr\n-00008710: 6f63 6564 7572 6520 696e 6974 6961 6c69 ocedure initiali\n-00008720: 7a65 7320 6120 6e65 7720 736f 636b 6574 zes a new socket\n-00008730: 206f 626a 6563 7420 6279 2072 6573 6572 object by reser\n-00008740: 7669 6e67 2061 2066 696c 650a 2020 2020 ving a file. \n-00008750: 2064 6573 6372 6970 746f 7220 746f 2074 descriptor to t\n-00008760: 6865 206f 7065 7261 7469 6e67 2073 7973 he operating sys\n-00008770: 7465 6d2e 2020 466f 7220 6261 636b 7761 tem. For backwa\n-00008780: 7264 2063 6f6d 7061 7469 6269 6c69 7479 rd compatibility\n-00008790: 0a20 2020 2020 7769 7468 206f 6c64 6572 . with older\n-000087a0: 2076 6572 7369 6f6e 7320 6f66 2074 6869 versions of thi\n-000087b0: 7320 6c69 6272 6172 792c 20e2 8098 4146 s library, ...AF\n-000087c0: 5f49 4e45 54e2 8099 2069 7320 7374 696c _INET... is stil\n-000087d0: 6c20 6163 6365 7074 6564 2061 730a 2020 l accepted as. \n-000087e0: 2020 2061 2076 616c 7565 2062 7574 2073 a value but s\n-000087f0: 686f 756c 6420 6265 2072 6570 6c61 6365 hould be replace\n-00008800: 6420 6173 2073 6f6f 6e20 6173 2070 6f73 d as soon as pos\n-00008810: 7369 626c 6520 7769 7468 2074 6865 2070 sible with the p\n-00008820: 726f 7065 720a 2020 2020 20e2 8098 5046 roper. ...PF\n-00008830: 5f49 4e45 54e2 8099 2e20 2055 7369 6e67 _INET.... Using\n-00008840: 20e2 8098 534f 434b 5f53 5452 4541 4de2 ...SOCK_STREAM.\n-00008850: 8099 2066 6f72 2074 6865 2054 5950 2061 .. for the TYP a\n-00008860: 7267 756d 656e 7420 7769 6c6c 2063 7265 rgument will cre\n-00008870: 6174 6520 610a 2020 2020 2054 4350 2073 ate a. TCP s\n-00008880: 6f63 6b65 7420 7768 696c 6520 6120 e280 ocket while a ..\n-00008890: 9853 4f43 4b5f 4447 5241 4de2 8099 2077 .SOCK_DGRAM... w\n-000088a0: 696c 6c20 6372 6561 7465 2061 2055 4450 ill create a UDP\n-000088b0: 206f 6e65 2e0a 0a45 5841 4d50 4c45 0a20 one...EXAMPLE. \n-000088c0: 2020 2020 2020 2020 2064 6563 6c61 7265 declare\n-000088d0: 0a20 2020 2020 2020 2020 2020 2020 536f . So\n-000088e0: 636b 203a 2053 6f63 6b65 745f 4644 3b0a ck : Socket_FD;.\n-000088f0: 2020 2020 2020 2020 2020 6265 6769 6e0a begin.\n-00008900: 2020 2020 2020 2020 2020 2020 202d 2d20 -- \n-00008910: 4372 6561 7465 2061 2054 4350 2073 6f63 Create a TCP soc\n-00008920: 6b65 740a 2020 2020 2020 2020 2020 2020 ket. \n-00008930: 2053 6f63 6b65 7420 2853 6f63 6b2c 2050 Socket (Sock, P\n-00008940: 465f 494e 4554 2c20 534f 434b 5f53 5452 F_INET, SOCK_STR\n-00008950: 4541 4d29 3b0a 2020 2020 2020 2020 2020 EAM);. \n-00008960: 2020 202d 2d20 5065 7266 6f72 6d20 736f -- Perform so\n-00008970: 6d65 206f 7065 7261 7469 6f6e 7320 6f6e me operations on\n-00008980: 2073 6f63 6b65 740a 2020 2020 2020 2020 socket. \n-00008990: 2020 2020 205b 2e2e 2e5d 0a20 2020 2020 [...]. \n-000089a0: 2020 2020 2020 2020 2d2d 2053 6875 7464 -- Shutd\n-000089b0: 6f77 6e20 7468 6520 736f 636b 6574 2069 own the socket i\n-000089c0: 6e20 626f 7468 2064 6972 6563 7469 6f6e n both direction\n-000089d0: 730a 2020 2020 2020 2020 2020 2020 2053 s. S\n-000089e0: 6875 7464 6f77 6e20 2853 6f63 6b2c 2042 hutdown (Sock, B\n-000089f0: 6f74 6829 3b0a 2020 2020 2020 2020 2020 oth);. \n-00008a00: 656e 643b 0a0a 5345 4520 414c 534f 0a20 end;..SEE ALSO. \n-00008a10: 2020 2020 2a6e 6f74 6520 5368 7574 646f *note Shutdo\n-00008a20: 776e 2028 7072 6f63 6564 7572 6529 3a3a wn (procedure)::\n-00008a30: 2e0a 0a1f 0a46 696c 653a 2061 6461 736f .....File: adaso\n-00008a40: 636b 6574 732e 696e 666f 2c20 204e 6f64 ckets.info, Nod\n-00008a50: 653a 2055 6e73 6574 5f42 7566 6665 7220 e: Unset_Buffer \n-00008a60: 2870 726f 6365 6475 7265 292c 2020 5072 (procedure), Pr\n-00008a70: 6576 3a20 536f 636b 6574 2028 7072 6f63 ev: Socket (proc\n-00008a80: 6564 7572 6529 2c20 2055 703a 2041 6363 edure), Up: Acc\n-00008a90: 6570 745f 536f 636b 6574 2028 7072 6f63 ept_Socket (proc\n-00008aa0: 6564 7572 6529 0a0a 556e 7365 745f 4275 edure)..Unset_Bu\n-00008ab0: 6666 6572 2028 7072 6f63 6564 7572 6529 ffer (procedure)\n-00008ac0: 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d .---------------\n-00008ad0: 2d2d 2d2d 2d2d 2d2d 2d0a 0a50 5552 504f ---------..PURPO\n-00008ae0: 5345 0a20 2020 2020 4465 696e 7374 616c SE. Deinstal\n-00008af0: 6c20 7468 6520 6c69 6e65 2d6f 7269 656e l the line-orien\n-00008b00: 7465 6420 6275 6666 6572 206f 6620 7468 ted buffer of th\n-00008b10: 6520 736f 636b 6574 206f 626a 6563 740a e socket object.\n-00008b20: 5052 4f54 4f54 5950 450a 2020 2020 2020 PROTOTYPE. \n-00008b30: 2d2d 2053 6f63 6b65 7473 2e55 6e73 6574 -- Sockets.Unset\n-00008b40: 5f42 7566 6665 723a 2070 726f 6365 6475 _Buffer: procedu\n-00008b50: 7265 2055 6e73 6574 5f42 7566 6665 720a re Unset_Buffer.\n-00008b60: 2020 2020 2020 2020 2020 2020 2020 2028 (\n-00008b70: 534f 434b 4554 203a 2053 6f63 6b65 745f SOCKET : Socket_\n-00008b80: 4644 2743 6c61 7373 293b 0a0a 5041 5241 FD'Class);..PARA\n-00008b90: 4d45 5445 5253 0a20 2020 2020 534f 434b METERS. SOCK\n-00008ba0: 4554 2020 2020 2069 6e20 2020 2020 2020 ET in \n-00008bb0: 2020 496e 6974 6961 6c69 7a65 6420 616e Initialized an\n-00008bc0: 6420 636f 6e6e 6563 7465 6420 736f 636b d connected sock\n-00008bd0: 6574 206f 626a 6563 740a 0a44 4553 4352 et object..DESCR\n-00008be0: 4950 5449 4f4e 0a20 2020 2020 5468 6973 IPTION. This\n-00008bf0: 2070 726f 6365 6475 7265 2075 6e69 6e73 procedure unins\n-00008c00: 7461 6c6c 7320 7468 6520 6275 6666 6572 talls the buffer\n-00008c10: 2070 7265 7669 6f75 736c 7920 696e 7374 previously inst\n-00008c20: 616c 6c65 6420 6279 202a 6e6f 7465 0a20 alled by *note. \n-00008c30: 2020 2020 5365 745f 4275 6666 6572 2028 Set_Buffer (\n-00008c40: 7072 6f63 6564 7572 6529 3a3a 2e20 2049 procedure)::. I\n-00008c50: 6620 616e 7920 6461 7461 2069 7320 7374 f any data is st\n-00008c60: 696c 6c20 7072 6573 656e 7420 696e 2074 ill present in t\n-00008c70: 6865 0a20 2020 2020 6275 6666 6572 2c20 he. buffer, \n-00008c80: 6974 2077 696c 6c20 6265 206c 6f73 742e it will be lost.\n-00008c90: 2020 546f 2061 766f 6964 2074 6869 7320 To avoid this \n-00008ca0: 7369 7475 6174 696f 6e2c 2074 6865 2062 situation, the b\n-00008cb0: 7566 6665 7220 6361 6e0a 2020 2020 2062 uffer can. b\n-00008cc0: 6520 666c 7573 6865 6420 6279 2063 616c e flushed by cal\n-00008cd0: 6c69 6e67 202a 6e6f 7465 2047 6574 2028 ling *note Get (\n-00008ce0: 6675 6e63 7469 6f6e 293a 3a2e 0a0a 1f0a function)::.....\n-00008cf0: 4669 6c65 3a20 6164 6173 6f63 6b65 7473 File: adasockets\n-00008d00: 2e69 6e66 6f2c 2020 4e6f 6465 3a20 536f .info, Node: So\n-00008d10: 636b 6574 732e 4d75 6c74 6963 6173 7420 ckets.Multicast \n-00008d20: 7061 636b 6167 652c 2020 4e65 7874 3a20 package, Next: \n-00008d30: 536f 636b 6574 732e 4e61 6d69 6e67 2070 Sockets.Naming p\n-00008d40: 6163 6b61 6765 2c20 2050 7265 763a 2053 ackage, Prev: S\n-00008d50: 6f63 6b65 7473 2070 6163 6b61 6765 2c20 ockets package, \n-00008d60: 2055 703a 2054 6f70 0a0a 3520 536f 636b Up: Top..5 Sock\n-00008d70: 6574 732e 4d75 6c74 6963 6173 7420 7061 ets.Multicast pa\n-00008d80: 636b 6167 650a 2a2a 2a2a 2a2a 2a2a 2a2a ckage.**********\n-00008d90: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a ****************\n-00008da0: 2a0a 0a54 6865 20e2 8098 536f 636b 6574 *..The ...Socket\n-00008db0: 732e 4d75 6c74 6963 6173 74e2 8099 2061 s.Multicast... a\n-00008dc0: 6c6c 6f77 7320 7468 6520 6372 6561 7469 llows the creati\n-00008dd0: 6f6e 206f 6620 4950 206d 756c 7469 6361 on of IP multica\n-00008de0: 7374 2073 6f63 6b65 7473 2e0a 0a20 2d2d st sockets... --\n-00008df0: 2053 6f63 6b65 7473 2e4d 756c 7469 6361 Sockets.Multica\n-00008e00: 7374 2e4d 756c 7469 6361 7374 5f53 6f63 st.Multicast_Soc\n-00008e10: 6b65 745f 4644 3a20 7479 7065 204d 756c ket_FD: type Mul\n-00008e20: 7469 6361 7374 5f53 6f63 6b65 745f 4644 ticast_Socket_FD\n-00008e30: 2069 730a 2020 2020 2020 2020 2020 6e65 is. ne\n-00008e40: 7720 536f 636b 6574 5f46 4420 7769 7468 w Socket_FD with\n-00008e50: 2070 7269 7661 7465 3b0a 2020 2020 2054 private;. T\n-00008e60: 6865 20e2 8098 4d75 6c74 6963 6173 745f he ...Multicast_\n-00008e70: 536f 636b 6574 5f46 44e2 8099 2074 6167 Socket_FD... tag\n-00008e80: 6765 6420 7479 7065 2064 6572 6976 6573 ged type derives\n-00008e90: 2066 726f 6d20 7468 6520 e280 9853 6f63 from the ...Soc\n-00008ea0: 6b65 745f 4644 e280 990a 2020 2020 2074 ket_FD.... t\n-00008eb0: 7970 652e 2020 4974 2067 6574 7320 696e ype. It gets in\n-00008ec0: 6974 6961 6c69 7a65 6420 6279 2063 616c itialized by cal\n-00008ed0: 6c69 6e67 202a 6e6f 7465 2043 7265 6174 ling *note Creat\n-00008ee0: 655f 4d75 6c74 6963 6173 745f 536f 636b e_Multicast_Sock\n-00008ef0: 6574 0a20 2020 2020 2866 756e 6374 696f et. (functio\n-00008f00: 6e29 3a3a 2e20 2041 6e20 756e 696e 6974 n)::. An uninit\n-00008f10: 6961 6c69 7a65 6420 e280 984d 756c 7469 ialized ...Multi\n-00008f20: 6361 7374 5f53 6f63 6b65 745f 4644 e280 cast_Socket_FD..\n-00008f30: 9920 6361 6e20 6265 0a20 2020 2020 7375 . can be. su\n-00008f40: 6363 6573 7366 756c 6c79 2063 6f6d 7061 ccessfully compa\n-00008f50: 7265 6420 746f 20e2 8098 4e75 6c6c 5f4d red to ...Null_M\n-00008f60: 756c 7469 6361 7374 5f53 6f63 6b65 745f ulticast_Socket_\n-00008f70: 4644 e280 992e 0a0a 2a20 4d65 6e75 3a0a FD......* Menu:.\n-00008f80: 0a2a 2043 7265 6174 655f 4d75 6c74 6963 .* Create_Multic\n-00008f90: 6173 745f 536f 636b 6574 2028 6675 6e63 ast_Socket (func\n-00008fa0: 7469 6f6e 293a 3a0a 2020 2020 2020 2020 tion)::. \n-00008fb0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00008fc0: 4372 6561 7465 2061 6e20 4950 206d 756c Create an IP mul\n-00008fd0: 7469 6361 7374 2073 6f63 6b65 740a 2a20 ticast socket.* \n-00008fe0: 4372 6561 7465 5f4d 756c 7469 6361 7374 Create_Multicast\n-00008ff0: 5f53 6f63 6b65 7420 2866 756e 6374 696f _Socket (functio\n-00009000: 6e29 3a3a 0a20 2020 2020 2020 2020 2020 n)::. \n-00009010: 2020 2020 2020 2020 2020 2020 2043 7265 Cre\n-00009020: 6174 6520 616e 2049 5020 6d75 6c74 6963 ate an IP multic\n-00009030: 6173 7420 736f 636b 6574 0a0a 1f0a 4669 ast socket....Fi\n-00009040: 6c65 3a20 6164 6173 6f63 6b65 7473 2e69 le: adasockets.i\n-00009050: 6e66 6f2c 2020 4e6f 6465 3a20 4372 6561 nfo, Node: Crea\n-00009060: 7465 5f4d 756c 7469 6361 7374 5f53 6f63 te_Multicast_Soc\n-00009070: 6b65 7420 2866 756e 6374 696f 6e29 2c20 ket (function), \n-00009080: 204e 6578 743a 2043 7265 6174 655f 4d75 Next: Create_Mu\n-00009090: 6c74 6963 6173 745f 536f 636b 6574 2028 lticast_Socket (\n-000090a0: 6675 6e63 7469 6f6e 292c 2020 5072 6576 function), Prev\n-000090b0: 3a20 4372 6561 7465 5f4d 756c 7469 6361 : Create_Multica\n-000090c0: 7374 5f53 6f63 6b65 7420 2866 756e 6374 st_Socket (funct\n-000090d0: 696f 6e29 2c20 2055 703a 2053 6f63 6b65 ion), Up: Socke\n-000090e0: 7473 2e4d 756c 7469 6361 7374 2070 6163 ts.Multicast pac\n-000090f0: 6b61 6765 0a0a 4372 6561 7465 5f4d 756c kage..Create_Mul\n-00009100: 7469 6361 7374 5f53 6f63 6b65 7420 2866 ticast_Socket (f\n-00009110: 756e 6374 696f 6e29 0a3d 3d3d 3d3d 3d3d unction).=======\n-00009120: 3d3d 3d3d 3d3d 3d3d 3d3d 3d3d 3d3d 3d3d ================\n-00009130: 3d3d 3d3d 3d3d 3d3d 3d3d 3d0a 0a50 5552 ===========..PUR\n-00009140: 504f 5345 0a20 2020 2020 4372 6561 7465 POSE. Create\n-00009150: 2061 6e20 4950 206d 756c 7469 6361 7374 an IP multicast\n-00009160: 2073 6f63 6b65 740a 5052 4f54 4f54 5950 socket.PROTOTYP\n-00009170: 450a 2020 2020 2020 2d2d 2053 6f63 6b65 E. -- Socke\n-00009180: 7473 2e4d 756c 7469 6361 7374 2e43 7265 ts.Multicast.Cre\n-00009190: 6174 655f 4d75 6c74 6963 6173 745f 536f ate_Multicast_So\n-000091a0: 636b 6574 3a20 6675 6e63 7469 6f6e 0a20 cket: function. \n-000091b0: 2020 2020 2020 2020 2020 2020 2020 4372 Cr\n-000091c0: 6561 7465 5f4d 756c 7469 6361 7374 5f53 eate_Multicast_S\n-000091d0: 6f63 6b65 7420 2847 524f 5550 203a 2053 ocket (GROUP : S\n-000091e0: 7472 696e 673b 2050 4f52 5420 3a20 4e61 tring; PORT : Na\n-000091f0: 7475 7261 6c3b 0a20 2020 2020 2020 2020 tural;. \n-00009200: 2020 2020 2020 5454 4c20 3a20 506f 7369 TTL : Posi\n-00009210: 7469 7665 203a 3d20 3136 3b20 5345 4c46 tive := 16; SELF\n-00009220: 5f4c 4f4f 5020 3a20 426f 6f6c 6561 6e20 _LOOP : Boolean \n-00009230: 3a3d 2054 7275 653b 0a20 2020 2020 2020 := True;. \n-00009240: 2020 2020 2020 2020 4c4f 4341 4c5f 4946 LOCAL_IF\n-00009250: 203a 2053 7472 696e 6720 3a3d 2030 2e30 : String := 0.0\n-00009260: 2e30 2e30 290a 2020 2020 2020 2020 2020 .0.0). \n-00009270: 2020 2020 2072 6574 7572 6e20 4d75 6c74 return Mult\n-00009280: 6963 6173 745f 536f 636b 6574 5f46 443b icast_Socket_FD;\n-00009290: 0a0a 5041 5241 4d45 5445 5253 0a20 2020 ..PARAMETERS. \n-000092a0: 2020 4752 4f55 5020 2020 2020 2069 6e20 GROUP in \n-000092b0: 2020 2020 2020 2020 4950 2061 6464 7265 IP addre\n-000092c0: 7373 206f 6620 7468 6520 6d75 6c74 6963 ss of the multic\n-000092d0: 6173 7420 6772 6f75 7020 746f 0a20 2020 ast group to. \n-000092e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000092f0: 2020 2020 2020 2020 6a6f 696e 0a20 2020 join. \n-00009300: 2020 504f 5254 2020 2020 2020 2069 6e20 PORT in \n-00009310: 2020 2020 2020 2020 506f 7274 206f 6620 Port of \n-00009320: 7468 6520 6d75 6c74 6963 6173 7420 6772 the multicast gr\n-00009330: 6f75 7020 746f 206a 6f69 6e0a 2020 2020 oup to join. \n-00009340: 2054 544c 2020 2020 2020 2020 696e 2020 TTL in \n-00009350: 2020 2020 2020 2054 696d 652d 746f 2d6c Time-to-l\n-00009360: 6976 6520 6f66 2073 656e 7420 7061 636b ive of sent pack\n-00009370: 6574 730a 2020 2020 2053 454c 465f 4c4f ets. SELF_LO\n-00009380: 4f50 2020 696e 2020 2020 2020 2020 2053 OP in S\n-00009390: 686f 756c 6420 7468 6520 736f 636b 6574 hould the socket\n-000093a0: 2072 6563 6569 7665 2074 6865 2070 6163 receive the pac\n-000093b0: 6b65 7473 0a20 2020 2020 2020 2020 2020 kets. \n-000093c0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000093d0: 7365 6e74 2066 726f 6d20 7468 6520 6c6f sent from the lo\n-000093e0: 6361 6c20 686f 7374 3f0a 2020 2020 204c cal host?. L\n-000093f0: 4f43 414c 5f49 4620 2020 696e 2020 2020 OCAL_IF in \n-00009400: 2020 2020 2041 6464 7265 7373 206f 6620 Address of \n-00009410: 7468 6520 6c6f 6361 6c20 696e 7465 7266 the local interf\n-00009420: 6163 6520 746f 2075 7365 0a0a 5245 5455 ace to use..RETU\n-00009430: 524e 2056 414c 5545 0a20 2020 2020 5468 RN VALUE. Th\n-00009440: 6520 6e65 7720 696e 6974 6961 6c69 7a65 e new initialize\n-00009450: 6420 6d75 6c74 6963 6173 7420 736f 636b d multicast sock\n-00009460: 6574 0a0a 4445 5343 5249 5054 494f 4e0a et..DESCRIPTION.\n-00009470: 2020 2020 2054 6869 7320 6675 6e63 7469 This functi\n-00009480: 6f6e 2063 7265 6174 6573 2061 6e20 4950 on creates an IP\n-00009490: 206d 756c 7469 6361 7374 2073 6f63 6b65 multicast socke\n-000094a0: 7420 6174 7461 6368 6564 2074 6f20 6120 t attached to a \n-000094b0: 6769 7665 6e0a 2020 2020 2067 726f 7570 given. group\n-000094c0: 2c20 6964 656e 7469 6669 6564 2062 7920 , identified by \n-000094d0: 6974 7320 636c 6173 7320 4520 4950 2061 its class E IP a\n-000094e0: 6464 7265 7373 2061 6e64 2070 6f72 742e ddress and port.\n-000094f0: 0a0a 2020 2020 2042 6520 6361 7265 6675 .. Be carefu\n-00009500: 6c20 7768 656e 2063 686f 6f73 696e 6720 l when choosing \n-00009510: 7468 6520 5454 4c20 7061 7261 6d65 7465 the TTL paramete\n-00009520: 7220 6f66 2079 6f75 7220 4950 206d 756c r of your IP mul\n-00009530: 7469 6361 7374 0a20 2020 2020 736f 636b ticast. sock\n-00009540: 6574 2e20 204d 6f73 7420 4950 206d 756c et. Most IP mul\n-00009550: 7469 6361 7374 2072 6f75 7465 7273 2064 ticast routers d\n-00009560: 6f20 696d 706c 656d 656e 7420 7468 7265 o implement thre\n-00009570: 7368 6f6c 642d 6261 7365 640a 2020 2020 shold-based. \n-00009580: 2066 696c 7465 7269 6e67 2061 6e64 2077 filtering and w\n-00009590: 696c 6c20 6e6f 7420 6c65 7420 4950 206d ill not let IP m\n-000095a0: 756c 7469 6361 7374 2070 6163 6b65 7473 ulticast packets\n-000095b0: 206c 6561 7665 2079 6f75 720a 2020 2020 leave your. \n-000095c0: 206f 7267 616e 697a 6174 696f 6e20 6966 organization if\n-000095d0: 2074 6865 2054 544c 206f 6e20 7468 6520 the TTL on the \n-000095e0: 6c61 7374 2072 6f75 7465 7220 6973 2073 last router is s\n-000095f0: 6d61 6c6c 6572 2074 6861 6e20 3136 2e0a maller than 16..\n-00009600: 0a20 2020 2020 4966 2030 2069 7320 6769 . If 0 is gi\n-00009610: 7665 6e20 666f 7220 7468 6520 506f 7274 ven for the Port\n-00009620: 2c20 6120 6c6f 6361 6c20 6f6e 6520 7769 , a local one wi\n-00009630: 6c6c 2062 6520 6368 6f73 656e 2e20 2049 ll be chosen. I\n-00009640: 7420 6361 6e0a 2020 2020 2074 6865 6e20 t can. then \n-00009650: 6c61 7465 7220 6265 2072 6574 7269 6576 later be retriev\n-00009660: 6564 2075 7369 6e67 2047 6574 5f53 6f63 ed using Get_Soc\n-00009670: 6b5f 506f 7274 2e0a 0a45 5841 4d50 4c45 k_Port...EXAMPLE\n-00009680: 0a20 2020 2020 2020 2020 2064 6563 6c61 . decla\n-00009690: 7265 0a20 2020 2020 2020 2020 2020 2020 re. \n-000096a0: 536f 636b 2020 2020 203a 2053 6f63 6b65 Sock : Socke\n-000096b0: 745f 4644 3b0a 2020 2020 2020 2020 2020 t_FD;. \n-000096c0: 2020 2049 6e63 6f6d 696e 6720 3a20 536f Incoming : So\n-000096d0: 636b 6574 5f46 443b 0a20 2020 2020 2020 cket_FD;. \n-000096e0: 2020 2062 6567 696e 0a20 2020 2020 2020 begin. \n-000096f0: 2020 2020 2020 2d2d 2043 7265 6174 6520 -- Create \n-00009700: 6120 5443 5020 736f 636b 6574 206c 6973 a TCP socket lis\n-00009710: 7465 6e69 6e67 206f 6e20 6c6f 6361 6c20 tening on local \n-00009720: 706f 7274 2034 3136 310a 2020 2020 2020 port 4161. \n-00009730: 2020 2020 2020 2053 6f63 6b65 7420 2853 Socket (S\n-00009740: 6f63 6b2c 2050 465f 494e 4554 2c20 534f ock, PF_INET, SO\n-00009750: 434b 5f53 5452 4541 4d29 3b0a 2020 2020 CK_STREAM);. \n-00009760: 2020 2020 2020 2020 2042 696e 6420 2853 Bind (S\n-00009770: 6f63 6b2c 2034 3136 3129 3b0a 2020 2020 ock, 4161);. \n-00009780: 2020 2020 2020 2020 204c 6973 7465 6e20 Listen \n-00009790: 2853 6f63 6b2c 2033 293b 0a20 2020 2020 (Sock, 3);. \n-000097a0: 2020 2020 2020 2020 2d2d 204f 6e65 2d63 -- One-c\n-000097b0: 6f6e 6e65 6374 696f 6e2d 6174 2d61 2d74 onnection-at-a-t\n-000097c0: 696d 6520 7365 7276 6572 2028 3320 6d61 ime server (3 ma\n-000097d0: 7920 6265 2070 656e 6469 6e67 290a 2020 y be pending). \n-000097e0: 2020 2020 2020 2020 2020 206c 6f6f 700a loop.\n-000097f0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00009800: 2d2d 2057 6169 7420 666f 7220 6120 6e65 -- Wait for a ne\n-00009810: 7720 636f 6e6e 6563 7469 6f6e 2061 6e64 w connection and\n-00009820: 2061 6363 6570 7420 6974 0a20 2020 2020 accept it. \n-00009830: 2020 2020 2020 2020 2020 2041 6363 6570 Accep\n-00009840: 745f 536f 636b 6574 2028 536f 636b 2c20 t_Socket (Sock, \n-00009850: 496e 636f 6d69 6e67 293b 0a20 2020 2020 Incoming);. \n-00009860: 2020 2020 2020 2020 2020 202d 2d20 446f -- Do\n-00009870: 2073 6f6d 6520 6469 616c 6f67 2077 6974 some dialog wit\n-00009880: 6820 7468 6520 7265 6d6f 7465 2068 6f73 h the remote hos\n-00009890: 740a 2020 2020 2020 2020 2020 2020 2020 t. \n-000098a0: 2020 446f 5f53 6f6d 655f 4469 616c 6f67 Do_Some_Dialog\n-000098b0: 2028 496e 636f 6d69 6e67 293b 0a20 2020 (Incoming);. \n-000098c0: 2020 2020 2020 2020 2020 2020 202d 2d20 -- \n-000098d0: 436c 6f73 6520 696e 636f 6d69 6e67 2073 Close incoming s\n-000098e0: 6f63 6b65 7420 616e 6420 7761 6974 2066 ocket and wait f\n-000098f0: 6f72 206e 6578 7420 636f 6e6e 6563 7469 or next connecti\n-00009900: 6f6e 0a20 2020 2020 2020 2020 2020 2020 on. \n-00009910: 2020 2053 6875 7464 6f77 6e20 2849 6e63 Shutdown (Inc\n-00009920: 6f6d 696e 6729 3b0a 2020 2020 2020 2020 oming);. \n-00009930: 2020 2020 2065 6e64 206c 6f6f 703b 0a20 end loop;. \n+00002f40: 2020 2020 2053 6f63 6b20 2020 2020 3a20 Sock : \n+00002f50: 536f 636b 6574 5f46 443b 0a20 2020 2020 Socket_FD;. \n+00002f60: 2020 2020 2020 2020 496e 636f 6d69 6e67 Incoming\n+00002f70: 203a 2053 6f63 6b65 745f 4644 3b0a 2020 : Socket_FD;. \n+00002f80: 2020 2020 2020 2020 6265 6769 6e0a 2020 begin. \n+00002f90: 2020 2020 2020 2020 2020 202d 2d20 4372 -- Cr\n+00002fa0: 6561 7465 2061 2054 4350 2073 6f63 6b65 eate a TCP socke\n+00002fb0: 7420 6c69 7374 656e 696e 6720 6f6e 206c t listening on l\n+00002fc0: 6f63 616c 2070 6f72 7420 3431 3631 0a20 ocal port 4161. \n+00002fd0: 2020 2020 2020 2020 2020 2020 536f 636b Sock\n+00002fe0: 6574 2028 536f 636b 2c20 5046 5f49 4e45 et (Sock, PF_INE\n+00002ff0: 542c 2053 4f43 4b5f 5354 5245 414d 293b T, SOCK_STREAM);\n+00003000: 0a20 2020 2020 2020 2020 2020 2020 4269 . Bi\n+00003010: 6e64 2028 536f 636b 2c20 3431 3631 293b nd (Sock, 4161);\n+00003020: 0a20 2020 2020 2020 2020 2020 2020 4c69 . Li\n+00003030: 7374 656e 2028 536f 636b 2c20 3329 3b0a sten (Sock, 3);.\n+00003040: 2020 2020 2020 2020 2020 2020 202d 2d20 -- \n+00003050: 4f6e 652d 636f 6e6e 6563 7469 6f6e 2d61 One-connection-a\n+00003060: 742d 612d 7469 6d65 2073 6572 7665 7220 t-a-time server \n+00003070: 2833 206d 6179 2062 6520 7065 6e64 696e (3 may be pendin\n+00003080: 6729 0a20 2020 2020 2020 2020 2020 2020 g). \n+00003090: 6c6f 6f70 0a20 2020 2020 2020 2020 2020 loop. \n+000030a0: 2020 2020 202d 2d20 5761 6974 2066 6f72 -- Wait for\n+000030b0: 2061 206e 6577 2063 6f6e 6e65 6374 696f a new connectio\n+000030c0: 6e20 616e 6420 6163 6365 7074 2069 740a n and accept it.\n+000030d0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000030e0: 4163 6365 7074 5f53 6f63 6b65 7420 2853 Accept_Socket (S\n+000030f0: 6f63 6b2c 2049 6e63 6f6d 696e 6729 3b0a ock, Incoming);.\n+00003100: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00003110: 2d2d 2044 6f20 736f 6d65 2064 6961 6c6f -- Do some dialo\n+00003120: 6720 7769 7468 2074 6865 2072 656d 6f74 g with the remot\n+00003130: 6520 686f 7374 0a20 2020 2020 2020 2020 e host. \n+00003140: 2020 2020 2020 2044 6f5f 536f 6d65 5f44 Do_Some_D\n+00003150: 6961 6c6f 6720 2849 6e63 6f6d 696e 6729 ialog (Incoming)\n+00003160: 3b0a 2020 2020 2020 2020 2020 2020 2020 ;. \n+00003170: 2020 2d2d 2043 6c6f 7365 2069 6e63 6f6d -- Close incom\n+00003180: 696e 6720 736f 636b 6574 2061 6e64 2077 ing socket and w\n+00003190: 6169 7420 666f 7220 6e65 7874 2063 6f6e ait for next con\n+000031a0: 6e65 6374 696f 6e0a 2020 2020 2020 2020 nection. \n+000031b0: 2020 2020 2020 2020 5368 7574 646f 776e Shutdown\n+000031c0: 2028 496e 636f 6d69 6e67 293b 0a20 2020 (Incoming);. \n+000031d0: 2020 2020 2020 2020 2020 656e 6420 6c6f end lo\n+000031e0: 6f70 3b0a 2020 2020 2020 2020 2020 656e op;. en\n+000031f0: 643b 0a0a 5345 4520 414c 534f 0a20 2020 d;..SEE ALSO. \n+00003200: 2020 2a6e 6f74 6520 4269 6e64 2028 7072 *note Bind (pr\n+00003210: 6f63 6564 7572 6529 3a3a 2c0a 2020 2020 ocedure)::,. \n+00003220: 202a 6e6f 7465 204c 6973 7465 6e20 2870 *note Listen (p\n+00003230: 726f 6365 6475 7265 293a 3a2c 0a20 2020 rocedure)::,. \n+00003240: 2020 2a6e 6f74 6520 5368 7574 646f 776e *note Shutdown\n+00003250: 2028 7072 6f63 6564 7572 6529 3a3a 2c0a (procedure)::,.\n+00003260: 2020 2020 202a 6e6f 7465 2053 6f63 6b65 *note Socke\n+00003270: 7420 2870 726f 6365 6475 7265 293a 3a2e t (procedure)::.\n+00003280: 0a0a 2a20 4d65 6e75 3a0a 0a2a 2042 696e ..* Menu:..* Bin\n+00003290: 6420 2870 726f 6365 6475 7265 293a 3a0a d (procedure)::.\n+000032a0: 2a20 436f 6e6e 6563 7420 2870 726f 6365 * Connect (proce\n+000032b0: 6475 7265 293a 3a0a 2a20 4765 7420 2866 dure)::.* Get (f\n+000032c0: 756e 6374 696f 6e29 3a3a 0a2a 2047 6574 unction)::.* Get\n+000032d0: 5f43 6861 7220 2866 756e 6374 696f 6e29 _Char (function)\n+000032e0: 3a3a 0a2a 2047 6574 5f4c 696e 6520 2866 ::.* Get_Line (f\n+000032f0: 756e 6374 696f 6e29 3a3a 0a2a 2047 6574 unction)::.* Get\n+00003300: 5f4c 696e 6520 2870 726f 6365 6475 7265 _Line (procedure\n+00003310: 293a 3a0a 2a20 4765 745f 5265 6365 6976 )::.* Get_Receiv\n+00003320: 655f 5175 6575 655f 5369 7a65 2028 6675 e_Queue_Size (fu\n+00003330: 6e63 7469 6f6e 293a 3a0a 2a20 4765 745f nction)::.* Get_\n+00003340: 5365 6e64 5f51 7565 7565 5f53 697a 6520 Send_Queue_Size \n+00003350: 2866 756e 6374 696f 6e29 3a3a 0a2a 2047 (function)::.* G\n+00003360: 6574 736f 636b 6f70 7420 2870 726f 6365 etsockopt (proce\n+00003370: 6475 7265 293a 3a0a 2a20 4c69 7374 656e dure)::.* Listen\n+00003380: 2028 7072 6f63 6564 7572 6529 3a3a 0a2a (procedure)::.*\n+00003390: 204e 6577 5f4c 696e 6520 2870 726f 6365 New_Line (proce\n+000033a0: 6475 7265 293a 3a0a 2a20 5075 7420 2870 dure)::.* Put (p\n+000033b0: 726f 6365 6475 7265 293a 3a0a 2a20 5075 rocedure)::.* Pu\n+000033c0: 745f 4c69 6e65 2028 7072 6f63 6564 7572 t_Line (procedur\n+000033d0: 6529 3a3a 0a2a 2052 6563 6569 7665 2028 e)::.* Receive (\n+000033e0: 6675 6e63 7469 6f6e 293a 3a0a 2a20 5265 function)::.* Re\n+000033f0: 6365 6976 6520 2870 726f 6365 6475 7265 ceive (procedure\n+00003400: 293a 3a0a 2a20 5265 6365 6976 655f 536f )::.* Receive_So\n+00003410: 6d65 2028 7072 6f63 6564 7572 6529 3a3a me (procedure)::\n+00003420: 0a2a 2053 656e 6420 2870 726f 6365 6475 .* Send (procedu\n+00003430: 7265 293a 3a0a 2a20 5365 745f 4275 6666 re)::.* Set_Buff\n+00003440: 6572 2028 7072 6f63 6564 7572 6529 3a3a er (procedure)::\n+00003450: 0a2a 2053 6574 736f 636b 6f70 7420 2870 .* Setsockopt (p\n+00003460: 726f 6365 6475 7265 293a 3a0a 2a20 5368 rocedure)::.* Sh\n+00003470: 7574 646f 776e 2028 7072 6f63 6564 7572 utdown (procedur\n+00003480: 6529 3a3a 0a2a 2053 6f63 6b65 7420 2870 e)::.* Socket (p\n+00003490: 726f 6365 6475 7265 293a 3a0a 2a20 556e rocedure)::.* Un\n+000034a0: 7365 745f 4275 6666 6572 2028 7072 6f63 set_Buffer (proc\n+000034b0: 6564 7572 6529 3a3a 0a0a 1f0a 4669 6c65 edure)::....File\n+000034c0: 3a20 6164 6173 6f63 6b65 7473 2e69 6e66 : adasockets.inf\n+000034d0: 6f2c 2020 4e6f 6465 3a20 4269 6e64 2028 o, Node: Bind (\n+000034e0: 7072 6f63 6564 7572 6529 2c20 204e 6578 procedure), Nex\n+000034f0: 743a 2043 6f6e 6e65 6374 2028 7072 6f63 t: Connect (proc\n+00003500: 6564 7572 6529 2c20 2050 7265 763a 2041 edure), Prev: A\n+00003510: 6363 6570 745f 536f 636b 6574 2028 7072 ccept_Socket (pr\n+00003520: 6f63 6564 7572 6529 2c20 2055 703a 2041 ocedure), Up: A\n+00003530: 6363 6570 745f 536f 636b 6574 2028 7072 ccept_Socket (pr\n+00003540: 6f63 6564 7572 6529 0a0a 4269 6e64 2028 ocedure)..Bind (\n+00003550: 7072 6f63 6564 7572 6529 0a2d 2d2d 2d2d procedure).-----\n+00003560: 2d2d 2d2d 2d2d 2d2d 2d2d 2d0a 0a50 5552 -----------..PUR\n+00003570: 504f 5345 0a20 2020 2020 4173 736f 6369 POSE. Associ\n+00003580: 6174 6520 6120 6c6f 6361 6c20 706f 7274 ate a local port\n+00003590: 2074 6f20 6120 736f 636b 6574 0a50 524f to a socket.PRO\n+000035a0: 544f 5459 5045 0a20 2020 2020 202d 2d20 TOTYPE. -- \n+000035b0: 536f 636b 6574 732e 4269 6e64 3a20 7072 Sockets.Bind: pr\n+000035c0: 6f63 6564 7572 6520 4269 6e64 2028 534f ocedure Bind (SO\n+000035d0: 434b 4554 203a 2053 6f63 6b65 745f 4644 CKET : Socket_FD\n+000035e0: 3b0a 2020 2020 2020 2020 2020 2020 2020 ;. \n+000035f0: 2050 4f52 5420 3a20 4e61 7475 7261 6c3b PORT : Natural;\n+00003600: 2048 4f53 5420 3a20 5374 7269 6e67 203a HOST : String :\n+00003610: 3d20 2222 293b 0a0a 5041 5241 4d45 5445 = \"\");..PARAMETE\n+00003620: 5253 0a20 2020 2020 534f 434b 4554 2020 RS. SOCKET \n+00003630: 2020 2069 6e20 2020 2020 2020 2020 496e in In\n+00003640: 6974 6961 6c69 7a65 6420 736f 636b 6574 itialized socket\n+00003650: 206f 626a 6563 740a 2020 2020 2050 4f52 object. POR\n+00003660: 5420 2020 2020 2020 696e 2020 2020 2020 T in \n+00003670: 2020 204c 6f63 616c 2070 6f72 7420 746f Local port to\n+00003680: 2062 696e 6420 746f 0a20 2020 2020 484f bind to. HO\n+00003690: 5354 2020 2020 2020 2069 6e20 2020 2020 ST in \n+000036a0: 2020 2020 4c6f 6361 6c20 696e 7465 7266 Local interf\n+000036b0: 6163 6520 746f 2062 696e 6420 746f 0a0a ace to bind to..\n+000036c0: 4445 5343 5249 5054 494f 4e0a 2020 2020 DESCRIPTION. \n+000036d0: 2054 6869 7320 7072 6f63 6564 7572 6520 This procedure \n+000036e0: 7265 7175 6573 7473 2061 206c 6f63 616c requests a local\n+000036f0: 2070 6f72 7420 6672 6f6d 2074 6865 206f port from the o\n+00003700: 7065 7261 7469 6e67 2073 7973 7465 6d2e perating system.\n+00003710: 2020 4966 0a20 2020 2020 3020 6973 2067 If. 0 is g\n+00003720: 6976 656e 2069 6e20 504f 5254 2c20 7468 iven in PORT, th\n+00003730: 6520 7379 7374 656d 2077 696c 6c20 6173 e system will as\n+00003740: 7369 676e 2061 2066 7265 6520 706f 7274 sign a free port\n+00003750: 2077 686f 7365 206e 756d 6265 720a 2020 whose number. \n+00003760: 2020 2063 616e 206c 6174 6572 2062 6520 can later be \n+00003770: 7265 7472 6965 7665 6420 7573 696e 6720 retrieved using \n+00003780: 2a6e 6f74 6520 4765 745f 536f 636b 5f50 *note Get_Sock_P\n+00003790: 6f72 7420 2866 756e 6374 696f 6e29 3a3a ort (function)::\n+000037a0: 2e0a 2020 2020 2041 6c73 6f2c 206d 6f73 .. Also, mos\n+000037b0: 7420 6f70 6572 6174 696e 6720 7379 7374 t operating syst\n+000037c0: 656d 7320 7265 7175 6972 6520 7370 6563 ems require spec\n+000037d0: 6961 6c20 7072 6976 696c 6567 6573 2069 ial privileges i\n+000037e0: 6620 796f 7520 7761 6e74 0a20 2020 2020 f you want. \n+000037f0: 746f 2062 696e 6420 746f 2070 6f72 7473 to bind to ports\n+00003800: 2062 656c 6f77 2031 3032 342e 0a0a 2020 below 1024... \n+00003810: 2020 2049 6620 484f 5354 2069 7320 6e6f If HOST is no\n+00003820: 7420 7468 6520 656d 7074 7920 7374 7269 t the empty stri\n+00003830: 6e67 2c20 6974 206d 7573 7420 636f 6e74 ng, it must cont\n+00003840: 6169 6e20 7468 6520 4950 2061 6464 7265 ain the IP addre\n+00003850: 7373 206f 660a 2020 2020 2061 206c 6f63 ss of. a loc\n+00003860: 616c 2069 6e74 6572 6661 6365 2074 6f20 al interface to \n+00003870: 6269 6e64 2074 6f2c 206f 7220 6120 6e61 bind to, or a na\n+00003880: 6d65 2077 6869 6368 2072 6573 6f6c 7665 me which resolve\n+00003890: 7320 696e 746f 2073 7563 6820 616e 0a20 s into such an. \n+000038a0: 2020 2020 6164 6472 6573 732e 2020 4966 address. If\n+000038b0: 2061 6e20 656d 7074 7920 7374 7269 6e67 an empty string\n+000038c0: 2069 7320 6769 7665 6e20 2874 6865 2064 is given (the d\n+000038d0: 6566 6175 6c74 292c 2074 6865 2073 6f63 efault), the soc\n+000038e0: 6b65 740a 2020 2020 2077 696c 6c20 6265 ket. will be\n+000038f0: 2062 6f75 6e64 2074 6f20 616c 6c20 7468 bound to all th\n+00003900: 6520 6176 6169 6c61 626c 6520 696e 7465 e available inte\n+00003910: 7266 6163 6573 2e0a 0a45 5843 4550 5449 rfaces...EXCEPTI\n+00003920: 4f4e 530a 2020 2020 20e2 8098 536f 636b ONS. ...Sock\n+00003930: 6574 5f45 7272 6f72 e280 9920 2020 2020 et_Error... \n+00003940: 5265 7175 6573 7465 6420 706f 7274 206f Requested port o\n+00003950: 7220 696e 7465 7266 6163 6520 6e6f 7420 r interface not \n+00003960: 6176 6169 6c61 626c 650a 0a53 4545 2041 available..SEE A\n+00003970: 4c53 4f0a 2020 2020 202a 6e6f 7465 204c LSO. *note L\n+00003980: 6973 7465 6e20 2870 726f 6365 6475 7265 isten (procedure\n+00003990: 293a 3a2c 0a20 2020 2020 2a6e 6f74 6520 )::,. *note \n+000039a0: 536f 636b 6574 2028 7072 6f63 6564 7572 Socket (procedur\n+000039b0: 6529 3a3a 2e0a 0a1f 0a46 696c 653a 2061 e)::.....File: a\n+000039c0: 6461 736f 636b 6574 732e 696e 666f 2c20 dasockets.info, \n+000039d0: 204e 6f64 653a 2043 6f6e 6e65 6374 2028 Node: Connect (\n+000039e0: 7072 6f63 6564 7572 6529 2c20 204e 6578 procedure), Nex\n+000039f0: 743a 2047 6574 2028 6675 6e63 7469 6f6e t: Get (function\n+00003a00: 292c 2020 5072 6576 3a20 4269 6e64 2028 ), Prev: Bind (\n+00003a10: 7072 6f63 6564 7572 6529 2c20 2055 703a procedure), Up:\n+00003a20: 2041 6363 6570 745f 536f 636b 6574 2028 Accept_Socket (\n+00003a30: 7072 6f63 6564 7572 6529 0a0a 436f 6e6e procedure)..Conn\n+00003a40: 6563 7420 2870 726f 6365 6475 7265 290a ect (procedure).\n+00003a50: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n+00003a60: 2d2d 2d0a 0a50 5552 504f 5345 0a20 2020 ---..PURPOSE. \n+00003a70: 2020 436f 6e6e 6563 7420 6120 736f 636b Connect a sock\n+00003a80: 6574 206f 6e20 6120 6769 7665 6e20 686f et on a given ho\n+00003a90: 7374 2f70 6f72 740a 5052 4f54 4f54 5950 st/port.PROTOTYP\n+00003aa0: 450a 2020 2020 2020 2d2d 2053 6f63 6b65 E. -- Socke\n+00003ab0: 7473 2e43 6f6e 6e65 6374 3a20 7072 6f63 ts.Connect: proc\n+00003ac0: 6564 7572 6520 436f 6e6e 6563 7420 2853 edure Connect (S\n+00003ad0: 4f43 4b45 5420 3a20 536f 636b 6574 5f46 OCKET : Socket_F\n+00003ae0: 443b 0a20 2020 2020 2020 2020 2020 2020 D;. \n+00003af0: 2020 484f 5354 203a 2053 7472 696e 673b HOST : String;\n+00003b00: 2050 4f52 5420 3a20 506f 7369 7469 7665 PORT : Positive\n+00003b10: 293b 0a0a 5041 5241 4d45 5445 5253 0a20 );..PARAMETERS. \n+00003b20: 2020 2020 534f 434b 4554 2020 2020 2069 SOCKET i\n+00003b30: 6e20 2020 2020 2020 2020 496e 6974 6961 n Initia\n+00003b40: 6c69 7a65 6420 736f 636b 6574 206f 626a lized socket obj\n+00003b50: 6563 740a 2020 2020 2048 4f53 5420 2020 ect. HOST \n+00003b60: 2020 2020 696e 2020 2020 2020 2020 2048 in H\n+00003b70: 6f73 7420 746f 2063 6f6e 6e65 6374 2074 ost to connect t\n+00003b80: 6f0a 2020 2020 2050 4f52 5420 2020 2020 o. PORT \n+00003b90: 2020 696e 2020 2020 2020 2020 2050 6f72 in Por\n+00003ba0: 7420 746f 2063 6f6e 6e65 6374 2074 6f0a t to connect to.\n+00003bb0: 0a44 4553 4352 4950 5449 4f4e 0a20 2020 .DESCRIPTION. \n+00003bc0: 2020 5468 6973 2070 726f 6365 6475 7265 This procedure\n+00003bd0: 2063 6f6e 6e65 6374 7320 616e 2069 6e69 connects an ini\n+00003be0: 7469 616c 697a 6564 2073 6f63 6b65 7420 tialized socket \n+00003bf0: 746f 2061 2067 6976 656e 2068 6f73 7420 to a given host \n+00003c00: 6f6e 2061 0a20 2020 2020 6769 7665 6e20 on a. given \n+00003c10: 706f 7274 2e20 2049 6e20 7468 6520 6361 port. In the ca\n+00003c20: 7365 206f 6620 6120 5443 5020 736f 636b se of a TCP sock\n+00003c30: 6574 2c20 6120 7265 616c 2063 6f6e 6e65 et, a real conne\n+00003c40: 6374 696f 6e20 6973 0a20 2020 2020 6174 ction is. at\n+00003c50: 7465 6d70 7465 642e 2020 496e 2074 6865 tempted. In the\n+00003c60: 2063 6173 6520 6f66 2061 2055 4450 2073 case of a UDP s\n+00003c70: 6f63 6b65 742c 206e 6f20 636f 6e6e 6563 ocket, no connec\n+00003c80: 7469 6f6e 2074 616b 6573 2070 6c61 6365 tion takes place\n+00003c90: 0a20 2020 2020 6275 7420 7468 6520 656e . but the en\n+00003ca0: 6470 6f69 6e74 2063 6f6f 7264 696e 6174 dpoint coordinat\n+00003cb0: 6573 2061 7265 2072 6563 6f72 6465 642e es are recorded.\n+00003cc0: 0a0a 4558 4345 5054 494f 4e53 0a20 2020 ..EXCEPTIONS. \n+00003cd0: 2020 e280 9843 6f6e 6e65 6374 696f 6e5f ...Connection_\n+00003ce0: 5265 6675 7365 64e2 8099 5468 6520 636f Refused...The co\n+00003cf0: 6e6e 6563 7469 6f6e 2068 6173 2062 6565 nnection has bee\n+00003d00: 6e20 7265 6675 7365 6420 6279 2074 6865 n refused by the\n+00003d10: 0a20 2020 2020 2020 2020 2020 2020 2020 . \n+00003d20: 2020 2020 2020 2020 2073 6572 7665 720a server.\n+00003d30: 2020 2020 20e2 8098 536f 636b 6574 5f45 ...Socket_E\n+00003d40: 7272 6f72 e280 9920 2020 2020 416e 6f74 rror... Anot\n+00003d50: 6865 7220 6572 726f 7220 6f63 6375 7272 her error occurr\n+00003d60: 6564 2064 7572 696e 6720 7468 650a 2020 ed during the. \n+00003d70: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00003d80: 2020 2020 2020 636f 6e6e 6563 7469 6f6e connection\n+00003d90: 0a0a 4558 414d 504c 450a 2020 2020 2020 ..EXAMPLE. \n+00003da0: 2020 2020 6465 636c 6172 650a 2020 2020 declare. \n+00003db0: 2020 2020 2020 2020 2053 6f63 6b20 3a20 Sock : \n+00003dc0: 536f 636b 6574 5f46 443b 0a20 2020 2020 Socket_FD;. \n+00003dd0: 2020 2020 2062 6567 696e 0a20 2020 2020 begin. \n+00003de0: 2020 2020 2020 2020 2d2d 2043 7265 6174 -- Creat\n+00003df0: 6520 6120 5443 5020 736f 636b 6574 0a20 e a TCP socket. \n+00003e00: 2020 2020 2020 2020 2020 2020 536f 636b Sock\n+00003e10: 6574 2028 536f 636b 2c20 5046 5f49 4e45 et (Sock, PF_INE\n+00003e20: 542c 2053 4f43 4b5f 5354 5245 414d 293b T, SOCK_STREAM);\n+00003e30: 0a20 2020 2020 2020 2020 2020 2020 2d2d . --\n+00003e40: 2043 6f6e 6e65 6374 2069 7420 746f 2072 Connect it to r\n+00003e50: 6663 3131 3439 2e6e 6574 2773 206d 6169 fc1149.net's mai\n+00003e60: 6c20 7365 7276 6572 0a20 2020 2020 2020 l server. \n+00003e70: 2020 2020 2020 436f 6e6e 6563 7420 2853 Connect (S\n+00003e80: 6f63 6b2c 2022 6d61 696c 2e72 6663 3131 ock, \"mail.rfc11\n+00003e90: 3439 2e6e 6574 222c 2032 3529 3b0a 2020 49.net\", 25);. \n+00003ea0: 2020 2020 2020 2020 2020 202d 2d20 446f -- Do\n+00003eb0: 2061 206d 6169 6c20 7472 616e 7361 6374 a mail transact\n+00003ec0: 696f 6e20 7468 656e 2063 6c6f 7365 2074 ion then close t\n+00003ed0: 6865 2073 6f63 6b65 740a 2020 2020 2020 he socket. \n+00003ee0: 2020 2020 2020 205b 2e2e 2e5d 0a20 2020 [...]. \n+00003ef0: 2020 2020 2020 2065 6e64 3b0a 0a53 4545 end;..SEE\n+00003f00: 2041 4c53 4f0a 2020 2020 202a 6e6f 7465 ALSO. *note\n+00003f10: 2053 6f63 6b65 7420 2870 726f 6365 6475 Socket (procedu\n+00003f20: 7265 293a 3a2e 0a0a 1f0a 4669 6c65 3a20 re)::.....File: \n+00003f30: 6164 6173 6f63 6b65 7473 2e69 6e66 6f2c adasockets.info,\n+00003f40: 2020 4e6f 6465 3a20 4765 7420 2866 756e Node: Get (fun\n+00003f50: 6374 696f 6e29 2c20 204e 6578 743a 2047 ction), Next: G\n+00003f60: 6574 5f43 6861 7220 2866 756e 6374 696f et_Char (functio\n+00003f70: 6e29 2c20 2050 7265 763a 2043 6f6e 6e65 n), Prev: Conne\n+00003f80: 6374 2028 7072 6f63 6564 7572 6529 2c20 ct (procedure), \n+00003f90: 2055 703a 2041 6363 6570 745f 536f 636b Up: Accept_Sock\n+00003fa0: 6574 2028 7072 6f63 6564 7572 6529 0a0a et (procedure)..\n+00003fb0: 4765 7420 2866 756e 6374 696f 6e29 0a2d Get (function).-\n+00003fc0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d0a 0a50 -------------..P\n+00003fd0: 5552 504f 5345 0a20 2020 2020 4765 7420 URPOSE. Get \n+00003fe0: 6120 7374 7269 6e67 2066 726f 6d20 6120 a string from a \n+00003ff0: 7265 6d6f 7465 2068 6f73 740a 5052 4f54 remote host.PROT\n+00004000: 4f54 5950 450a 2020 2020 2020 2d2d 2053 OTYPE. -- S\n+00004010: 6f63 6b65 7473 2e47 6574 3a20 6675 6e63 ockets.Get: func\n+00004020: 7469 6f6e 2047 6574 2028 534f 434b 4554 tion Get (SOCKET\n+00004030: 203a 2053 6f63 6b65 745f 4644 2743 6c61 : Socket_FD'Cla\n+00004040: 7373 290a 2020 2020 2020 2020 2020 2020 ss). \n+00004050: 2020 2072 6574 7572 6e20 5374 7269 6e67 return String\n+00004060: 3b0a 0a50 4152 414d 4554 4552 530a 2020 ;..PARAMETERS. \n+00004070: 2020 2053 4f43 4b45 5420 2020 2020 696e SOCKET in\n+00004080: 2020 2020 2020 2020 2049 6e69 7469 616c Initial\n+00004090: 697a 6564 2061 6e64 2063 6f6e 6e65 6374 ized and connect\n+000040a0: 6564 2073 6f63 6b65 7420 6f62 6a65 6374 ed socket object\n+000040b0: 0a0a 5245 5455 524e 2056 414c 5545 0a20 ..RETURN VALUE. \n+000040c0: 2020 2020 536f 6d65 2063 6861 7261 6374 Some charact\n+000040d0: 6572 7320 7468 6174 2068 6176 6520 6265 ers that have be\n+000040e0: 656e 2072 6563 6569 7665 640a 0a44 4553 en received..DES\n+000040f0: 4352 4950 5449 4f4e 0a20 2020 2020 5468 CRIPTION. Th\n+00004100: 6973 2066 756e 6374 696f 6e20 7265 6365 is function rece\n+00004110: 6976 6573 2073 6f6d 6520 6368 6172 6163 ives some charac\n+00004120: 7465 7273 2066 726f 6d20 6120 7265 6d6f ters from a remo\n+00004130: 7465 2068 6f73 742e 2020 4173 2073 6f6f te host. As soo\n+00004140: 6e0a 2020 2020 2074 6861 7420 6174 206c n. that at l\n+00004150: 6561 7374 206f 6e65 2063 6861 7261 6374 east one charact\n+00004160: 6572 2069 7320 6176 6169 6c61 626c 652c er is available,\n+00004170: 2074 6865 2063 7572 7265 6e74 2072 6563 the current rec\n+00004180: 6570 7469 6f6e 0a20 2020 2020 6275 6666 eption. buff\n+00004190: 6572 2069 7320 7265 7475 726e 6564 2e0a er is returned..\n+000041a0: 0a20 2020 2020 5468 6572 6520 6973 2075 . There is u\n+000041b0: 7375 616c 6c79 206c 6974 746c 6520 6761 sually little ga\n+000041c0: 696e 2069 6e20 7573 696e 6720 7468 6973 in in using this\n+000041d0: 2066 756e 6374 696f 6e20 7768 6f73 6520 function whose \n+000041e0: 6265 6861 7669 6f72 0a20 2020 2020 6973 behavior. is\n+000041f0: 2063 6f6d 7061 7261 626c 6520 746f 2074 comparable to t\n+00004200: 6865 206f 6e65 206f 6620 2a6e 6f74 6520 he one of *note \n+00004210: 5265 6365 6976 6520 2866 756e 6374 696f Receive (functio\n+00004220: 6e29 3a3a 2e20 204f 7468 6572 0a20 2020 n)::. Other. \n+00004230: 2020 6675 6e63 7469 6f6e 7320 7375 6368 functions such\n+00004240: 2061 7320 2a6e 6f74 6520 4765 745f 4368 as *note Get_Ch\n+00004250: 6172 2028 6675 6e63 7469 6f6e 293a 3a2c ar (function)::,\n+00004260: 206f 7220 2a6e 6f74 6520 4765 745f 4c69 or *note Get_Li\n+00004270: 6e65 0a20 2020 2020 2866 756e 6374 696f ne. (functio\n+00004280: 6e29 3a3a 2c20 616c 6c6f 7720 6d6f 7265 n)::, allow more\n+00004290: 2073 7472 7563 7475 7265 6420 7072 6f67 structured prog\n+000042a0: 7261 6d6d 696e 672e 0a0a 2020 2020 2048 ramming... H\n+000042b0: 6f77 6576 6572 2c20 7468 6973 2066 756e owever, this fun\n+000042c0: 6374 696f 6e20 6d61 7920 6265 2075 7365 ction may be use\n+000042d0: 6420 746f 2061 766f 6964 206c 6f73 696e d to avoid losin\n+000042e0: 6720 6368 6172 6163 7465 7273 2077 6865 g characters whe\n+000042f0: 6e0a 2020 2020 2063 616c 6c69 6e67 202a n. calling *\n+00004300: 6e6f 7465 2055 6e73 6574 5f42 7566 6665 note Unset_Buffe\n+00004310: 7220 2870 726f 6365 6475 7265 293a 3a2c r (procedure)::,\n+00004320: 2069 662c 2066 6f72 2073 6f6d 6520 7265 if, for some re\n+00004330: 6173 6f6e 2c20 7468 650a 2020 2020 2072 ason, the. r\n+00004340: 656d 6f74 6520 686f 7374 206d 6179 2068 emote host may h\n+00004350: 6176 6520 7365 6e74 2073 6f6d 652e 0a0a ave sent some...\n+00004360: 4558 4345 5054 494f 4e53 0a20 2020 2020 EXCEPTIONS. \n+00004370: e280 9843 6f6e 6e65 6374 696f 6e5f 436c ...Connection_Cl\n+00004380: 6f73 6564 e280 9950 6565 7220 6861 7320 osed...Peer has \n+00004390: 636c 6f73 6564 2074 6865 2063 6f6e 6e65 closed the conne\n+000043a0: 6374 696f 6e20 6265 666f 7265 0a20 2020 ction before. \n+000043b0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000043c0: 2020 2020 2073 656e 6469 6e67 2061 6e79 sending any\n+000043d0: 2064 6174 610a 0a1f 0a46 696c 653a 2061 data....File: a\n+000043e0: 6461 736f 636b 6574 732e 696e 666f 2c20 dasockets.info, \n+000043f0: 204e 6f64 653a 2047 6574 5f43 6861 7220 Node: Get_Char \n+00004400: 2866 756e 6374 696f 6e29 2c20 204e 6578 (function), Nex\n+00004410: 743a 2047 6574 5f4c 696e 6520 2866 756e t: Get_Line (fun\n+00004420: 6374 696f 6e29 2c20 2050 7265 763a 2047 ction), Prev: G\n+00004430: 6574 2028 6675 6e63 7469 6f6e 292c 2020 et (function), \n+00004440: 5570 3a20 4163 6365 7074 5f53 6f63 6b65 Up: Accept_Socke\n+00004450: 7420 2870 726f 6365 6475 7265 290a 0a47 t (procedure)..G\n+00004460: 6574 5f43 6861 7220 2866 756e 6374 696f et_Char (functio\n+00004470: 6e29 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d n).-------------\n+00004480: 2d2d 2d2d 2d2d 0a0a 5055 5250 4f53 450a ------..PURPOSE.\n+00004490: 2020 2020 2047 6574 2061 2063 6861 7261 Get a chara\n+000044a0: 6374 6572 2066 726f 6d20 6120 7265 6d6f cter from a remo\n+000044b0: 7465 2068 6f73 740a 5052 4f54 4f54 5950 te host.PROTOTYP\n+000044c0: 450a 2020 2020 2020 2d2d 2053 6f63 6b65 E. -- Socke\n+000044d0: 7473 2e47 6574 5f43 6861 723a 2066 756e ts.Get_Char: fun\n+000044e0: 6374 696f 6e20 4765 745f 4368 6172 2028 ction Get_Char (\n+000044f0: 534f 434b 4554 203a 2053 6f63 6b65 745f SOCKET : Socket_\n+00004500: 4644 2743 6c61 7373 290a 2020 2020 2020 FD'Class). \n+00004510: 2020 2020 2020 2020 2072 6574 7572 6e20 return \n+00004520: 4368 6172 6163 7465 723b 0a0a 5041 5241 Character;..PARA\n+00004530: 4d45 5445 5253 0a20 2020 2020 534f 434b METERS. SOCK\n+00004540: 4554 2020 2020 2069 6e20 2020 2020 2020 ET in \n+00004550: 2020 496e 6974 6961 6c69 7a65 6420 616e Initialized an\n+00004560: 6420 636f 6e6e 6563 7465 6420 736f 636b d connected sock\n+00004570: 6574 206f 626a 6563 740a 0a52 4554 5552 et object..RETUR\n+00004580: 4e20 5641 4c55 450a 2020 2020 204f 6e65 N VALUE. One\n+00004590: 2063 6861 7261 6374 6572 2073 656e 7420 character sent \n+000045a0: 6279 2074 6865 2072 656d 6f74 6520 686f by the remote ho\n+000045b0: 7374 0a0a 4445 5343 5249 5054 494f 4e0a st..DESCRIPTION.\n+000045c0: 2020 2020 2054 6869 7320 6675 6e63 7469 This functi\n+000045d0: 6f6e 2072 6563 6569 7665 7320 6578 6163 on receives exac\n+000045e0: 746c 7920 6f6e 6520 6368 6172 6163 7465 tly one characte\n+000045f0: 7220 6672 6f6d 2074 6865 2072 656d 6f74 r from the remot\n+00004600: 6520 686f 7374 2e0a 0a45 5843 4550 5449 e host...EXCEPTI\n+00004610: 4f4e 530a 2020 2020 20e2 8098 436f 6e6e ONS. ...Conn\n+00004620: 6563 7469 6f6e 5f43 6c6f 7365 64e2 8099 ection_Closed...\n+00004630: 5065 6572 2068 6173 2063 6c6f 7365 6420 Peer has closed \n+00004640: 7468 6520 636f 6e6e 6563 7469 6f6e 2062 the connection b\n+00004650: 6566 6f72 650a 2020 2020 2020 2020 2020 efore. \n+00004660: 2020 2020 2020 2020 2020 2020 2020 7365 se\n+00004670: 6e64 696e 6720 7468 6520 6368 6172 6163 nding the charac\n+00004680: 7465 720a 0a53 4545 2041 4c53 4f0a 2020 ter..SEE ALSO. \n+00004690: 2020 202a 6e6f 7465 2047 6574 2028 6675 *note Get (fu\n+000046a0: 6e63 7469 6f6e 293a 3a2c 0a20 2020 2020 nction)::,. \n+000046b0: 2a6e 6f74 6520 4765 745f 4c69 6e65 2028 *note Get_Line (\n+000046c0: 6675 6e63 7469 6f6e 293a 3a2c 0a20 2020 function)::,. \n+000046d0: 2020 2a6e 6f74 6520 4765 745f 4c69 6e65 *note Get_Line\n+000046e0: 2028 7072 6f63 6564 7572 6529 3a3a 2c0a (procedure)::,.\n+000046f0: 2020 2020 202a 6e6f 7465 2052 6563 6569 *note Recei\n+00004700: 7665 2028 7072 6f63 6564 7572 6529 3a3a ve (procedure)::\n+00004710: 2c0a 2020 2020 202a 6e6f 7465 2053 6574 ,. *note Set\n+00004720: 5f42 7566 6665 7220 2870 726f 6365 6475 _Buffer (procedu\n+00004730: 7265 293a 3a2e 0a0a 1f0a 4669 6c65 3a20 re)::.....File: \n+00004740: 6164 6173 6f63 6b65 7473 2e69 6e66 6f2c adasockets.info,\n+00004750: 2020 4e6f 6465 3a20 4765 745f 4c69 6e65 Node: Get_Line\n+00004760: 2028 6675 6e63 7469 6f6e 292c 2020 4e65 (function), Ne\n+00004770: 7874 3a20 4765 745f 4c69 6e65 2028 7072 xt: Get_Line (pr\n+00004780: 6f63 6564 7572 6529 2c20 2050 7265 763a ocedure), Prev:\n+00004790: 2047 6574 5f43 6861 7220 2866 756e 6374 Get_Char (funct\n+000047a0: 696f 6e29 2c20 2055 703a 2041 6363 6570 ion), Up: Accep\n+000047b0: 745f 536f 636b 6574 2028 7072 6f63 6564 t_Socket (proced\n+000047c0: 7572 6529 0a0a 4765 745f 4c69 6e65 2028 ure)..Get_Line (\n+000047d0: 6675 6e63 7469 6f6e 290a 2d2d 2d2d 2d2d function).------\n+000047e0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d0a 0a50 -------------..P\n+000047f0: 5552 504f 5345 0a20 2020 2020 4765 7420 URPOSE. Get \n+00004800: 6120 7768 6f6c 6520 6c69 6e65 2066 726f a whole line fro\n+00004810: 6d20 6120 7265 6d6f 7465 2068 6f73 740a m a remote host.\n+00004820: 5052 4f54 4f54 5950 450a 2020 2020 2020 PROTOTYPE. \n+00004830: 2d2d 2053 6f63 6b65 7473 2e47 6574 5f4c -- Sockets.Get_L\n+00004840: 696e 653a 2066 756e 6374 696f 6e20 4765 ine: function Ge\n+00004850: 745f 4c69 6e65 2028 534f 434b 4554 203a t_Line (SOCKET :\n+00004860: 2053 6f63 6b65 745f 4644 2743 6c61 7373 Socket_FD'Class\n+00004870: 3b0a 2020 2020 2020 2020 2020 2020 2020 ;. \n+00004880: 204d 4158 5f4c 454e 4754 4820 3a20 506f MAX_LENGTH : Po\n+00004890: 7369 7469 7665 203a 3d20 3230 3438 290a sitive := 2048).\n+000048a0: 2020 2020 2020 2020 2020 2020 2020 2072 r\n+000048b0: 6574 7572 6e20 5374 7269 6e67 3b0a 0a50 eturn String;..P\n+000048c0: 4152 414d 4554 4552 530a 2020 2020 2053 ARAMETERS. S\n+000048d0: 4f43 4b45 5420 2020 2020 696e 2020 2020 OCKET in \n+000048e0: 2020 2020 2049 6e69 7469 616c 697a 6564 Initialized\n+000048f0: 2061 6e64 2063 6f6e 6e65 6374 6564 2073 and connected s\n+00004900: 6f63 6b65 7420 6f62 6a65 6374 0a20 2020 ocket object. \n+00004910: 2020 4d41 585f 4c45 4e47 5448 2069 6e20 MAX_LENGTH in \n+00004920: 2020 2020 2020 2020 4d61 7869 6d75 6d20 Maximum \n+00004930: 7265 7475 726e 6564 206c 696e 6520 6c65 returned line le\n+00004940: 6e67 7468 0a0a 5245 5455 524e 2056 414c ngth..RETURN VAL\n+00004950: 5545 0a20 2020 2020 4120 6c69 6e65 2077 UE. A line w\n+00004960: 6974 686f 7574 2074 6865 2043 5220 616e ithout the CR an\n+00004970: 6420 4c46 2073 6570 6172 6174 6f72 730a d LF separators.\n+00004980: 0a44 4553 4352 4950 5449 4f4e 0a20 2020 .DESCRIPTION. \n+00004990: 2020 5468 6973 2066 756e 6374 696f 6e20 This function \n+000049a0: 7265 6365 6976 6573 206f 6e65 206c 696e receives one lin\n+000049b0: 6520 6672 6f6d 2074 6865 2072 656d 6f74 e from the remot\n+000049c0: 6520 686f 7374 2e20 2041 206c 696e 650a e host. A line.\n+000049d0: 2020 2020 2063 6f6e 7369 7374 7320 696e consists in\n+000049e0: 746f 207a 6572 6f20 6f72 206d 6f72 6520 to zero or more \n+000049f0: 6368 6172 6163 7465 7273 2066 6f6c 6c6f characters follo\n+00004a00: 7765 6420 6279 2061 6e20 6f70 7469 6f6e wed by an option\n+00004a10: 616c 2043 520a 2020 2020 2061 6e64 2062 al CR. and b\n+00004a20: 7920 6120 4c46 2e20 5468 6f73 6520 7465 y a LF. Those te\n+00004a30: 726d 696e 6174 6f72 7320 6172 6520 7374 rminators are st\n+00004a40: 7269 7070 6564 2062 6566 6f72 6520 7468 ripped before th\n+00004a50: 6520 6c69 6e65 2069 730a 2020 2020 2072 e line is. r\n+00004a60: 6574 7572 6e65 642e 0a0a 2020 2020 2054 eturned... T\n+00004a70: 6869 7320 6675 6e63 7469 6f6e 2062 6c6f his function blo\n+00004a80: 636b 7320 756e 7469 6c20 6f6e 6520 6675 cks until one fu\n+00004a90: 6c6c 206c 696e 6520 6861 7320 6265 656e ll line has been\n+00004aa0: 2072 6563 6569 7665 642e 2020 5468 650a received. The.\n+00004ab0: 2020 2020 206c 696e 6520 6c65 6e67 7468 line length\n+00004ac0: 2069 7320 6c69 6d69 7465 6420 7769 7468 is limited with\n+00004ad0: 2074 6865 2076 616c 7565 206f 6620 7468 the value of th\n+00004ae0: 6520 4d61 785f 4c65 6e67 7468 2061 7267 e Max_Length arg\n+00004af0: 756d 656e 742c 0a20 2020 2020 746f 2061 ument,. to a\n+00004b00: 766f 6964 2065 7868 6175 7374 696f 6e20 void exhaustion \n+00004b10: 6f66 2074 6865 2073 6563 6f6e 6461 7279 of the secondary\n+00004b20: 2073 7461 636b 2e0a 0a45 5843 4550 5449 stack...EXCEPTI\n+00004b30: 4f4e 530a 2020 2020 20e2 8098 436f 6e6e ONS. ...Conn\n+00004b40: 6563 7469 6f6e 5f43 6c6f 7365 64e2 8099 ection_Closed...\n+00004b50: 5065 6572 2068 6173 2063 6c6f 7365 6420 Peer has closed \n+00004b60: 7468 6520 636f 6e6e 6563 7469 6f6e 2062 the connection b\n+00004b70: 6566 6f72 650a 2020 2020 2020 2020 2020 efore. \n+00004b80: 2020 2020 2020 2020 2020 2020 2020 7365 se\n+00004b90: 6e64 696e 6720 6120 7768 6f6c 6520 6c69 nding a whole li\n+00004ba0: 6e65 0a0a 5345 4520 414c 534f 0a20 2020 ne..SEE ALSO. \n+00004bb0: 2020 2a6e 6f74 6520 4765 7420 2866 756e *note Get (fun\n+00004bc0: 6374 696f 6e29 3a3a 2c0a 2020 2020 202a ction)::,. *\n+00004bd0: 6e6f 7465 2047 6574 5f43 6861 7220 2866 note Get_Char (f\n+00004be0: 756e 6374 696f 6e29 3a3a 2c0a 2020 2020 unction)::,. \n+00004bf0: 202a 6e6f 7465 2047 6574 5f4c 696e 6520 *note Get_Line \n+00004c00: 2870 726f 6365 6475 7265 293a 3a2c 0a20 (procedure)::,. \n+00004c10: 2020 2020 2a6e 6f74 6520 5265 6365 6976 *note Receiv\n+00004c20: 6520 2870 726f 6365 6475 7265 293a 3a2c e (procedure)::,\n+00004c30: 0a20 2020 2020 2a6e 6f74 6520 5365 745f . *note Set_\n+00004c40: 4275 6666 6572 2028 7072 6f63 6564 7572 Buffer (procedur\n+00004c50: 6529 3a3a 2e0a 0a1f 0a46 696c 653a 2061 e)::.....File: a\n+00004c60: 6461 736f 636b 6574 732e 696e 666f 2c20 dasockets.info, \n+00004c70: 204e 6f64 653a 2047 6574 5f4c 696e 6520 Node: Get_Line \n+00004c80: 2870 726f 6365 6475 7265 292c 2020 4e65 (procedure), Ne\n+00004c90: 7874 3a20 4765 745f 5265 6365 6976 655f xt: Get_Receive_\n+00004ca0: 5175 6575 655f 5369 7a65 2028 6675 6e63 Queue_Size (func\n+00004cb0: 7469 6f6e 292c 2020 5072 6576 3a20 4765 tion), Prev: Ge\n+00004cc0: 745f 4c69 6e65 2028 6675 6e63 7469 6f6e t_Line (function\n+00004cd0: 292c 2020 5570 3a20 4163 6365 7074 5f53 ), Up: Accept_S\n+00004ce0: 6f63 6b65 7420 2870 726f 6365 6475 7265 ocket (procedure\n+00004cf0: 290a 0a47 6574 5f4c 696e 6520 2870 726f )..Get_Line (pro\n+00004d00: 6365 6475 7265 290a 2d2d 2d2d 2d2d 2d2d cedure).--------\n+00004d10: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 0a0a 5055 ------------..PU\n+00004d20: 5250 4f53 450a 2020 2020 2047 6574 2061 RPOSE. Get a\n+00004d30: 2077 686f 6c65 206c 696e 6520 6672 6f6d whole line from\n+00004d40: 2061 2072 656d 6f74 6520 686f 7374 0a50 a remote host.P\n+00004d50: 524f 544f 5459 5045 0a20 2020 2020 202d ROTOTYPE. -\n+00004d60: 2d20 536f 636b 6574 732e 4765 745f 4c69 - Sockets.Get_Li\n+00004d70: 6e65 3a20 7072 6f63 6564 7572 6520 4765 ne: procedure Ge\n+00004d80: 745f 4c69 6e65 2028 534f 434b 4554 203a t_Line (SOCKET :\n+00004d90: 2053 6f63 6b65 745f 4644 2743 6c61 7373 Socket_FD'Class\n+00004da0: 3b0a 2020 2020 2020 2020 2020 2020 2020 ;. \n+00004db0: 2053 5452 203a 2069 6e20 6f75 7420 5374 STR : in out St\n+00004dc0: 7269 6e67 3b20 4c41 5354 203a 206f 7574 ring; LAST : out\n+00004dd0: 204e 6174 7572 616c 293b 0a0a 5041 5241 Natural);..PARA\n+00004de0: 4d45 5445 5253 0a20 2020 2020 534f 434b METERS. SOCK\n+00004df0: 4554 2020 2020 2069 6e20 2020 2020 2020 ET in \n+00004e00: 2020 496e 6974 6961 6c69 7a65 6420 616e Initialized an\n+00004e10: 6420 636f 6e6e 6563 7465 6420 736f 636b d connected sock\n+00004e20: 6574 206f 626a 6563 740a 2020 2020 2053 et object. S\n+00004e30: 5452 2020 2020 2020 2020 696e 206f 7574 TR in out\n+00004e40: 2020 2020 2053 7472 696e 6720 746f 2066 String to f\n+00004e50: 696c 6c0a 2020 2020 204c 4153 5420 2020 ill. LAST \n+00004e60: 2020 2020 6f75 7420 2020 2020 2020 204c out L\n+00004e70: 6173 7420 696e 6465 7820 7573 6564 2069 ast index used i\n+00004e80: 6e20 7468 6520 7374 7269 6e67 0a0a 4445 n the string..DE\n+00004e90: 5343 5249 5054 494f 4e0a 2020 2020 2054 SCRIPTION. T\n+00004ea0: 6869 7320 7072 6f63 6564 7572 6520 7265 his procedure re\n+00004eb0: 6365 6976 6573 206f 6e65 206c 696e 6520 ceives one line \n+00004ec0: 6672 6f6d 2074 6865 2072 656d 6f74 6520 from the remote \n+00004ed0: 686f 7374 2e20 2041 206c 696e 650a 2020 host. A line. \n+00004ee0: 2020 2063 6f6e 7369 7374 7320 696e 746f consists into\n+00004ef0: 207a 6572 6f20 6f72 206d 6f72 6520 6368 zero or more ch\n+00004f00: 6172 6163 7465 7273 2066 6f6c 6c6f 7765 aracters followe\n+00004f10: 6420 6279 2061 6e20 6f70 7469 6f6e 616c d by an optional\n+00004f20: 2043 520a 2020 2020 2061 6e64 2062 7920 CR. and by \n+00004f30: 6120 4c46 2e20 5468 6f73 6520 7465 726d a LF. Those term\n+00004f40: 696e 6174 6f72 7320 6172 6520 7374 7269 inators are stri\n+00004f50: 7070 6564 2062 6566 6f72 6520 7468 6520 pped before the \n+00004f60: 6c69 6e65 2069 730a 2020 2020 2072 6574 line is. ret\n+00004f70: 7572 6e65 642e 0a0a 2020 2020 2054 6869 urned... Thi\n+00004f80: 7320 7072 6f63 6564 7572 6520 626c 6f63 s procedure bloc\n+00004f90: 6b73 2075 6e74 696c 206f 6e65 2066 756c ks until one ful\n+00004fa0: 6c20 6c69 6e65 2068 6173 2062 6565 6e20 l line has been \n+00004fb0: 7265 6365 6976 6564 2e0a 0a45 5843 4550 received...EXCEP\n+00004fc0: 5449 4f4e 530a 2020 2020 20e2 8098 436f TIONS. ...Co\n+00004fd0: 6e6e 6563 7469 6f6e 5f43 6c6f 7365 64e2 nnection_Closed.\n+00004fe0: 8099 5065 6572 2068 6173 2063 6c6f 7365 ..Peer has close\n+00004ff0: 6420 7468 6520 636f 6e6e 6563 7469 6f6e d the connection\n+00005000: 2062 6566 6f72 650a 2020 2020 2020 2020 before. \n+00005010: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00005020: 7365 6e64 696e 6720 6120 7768 6f6c 6520 sending a whole \n+00005030: 6c69 6e65 0a0a 5345 4520 414c 534f 0a20 line..SEE ALSO. \n+00005040: 2020 2020 2a6e 6f74 6520 4765 7420 2866 *note Get (f\n+00005050: 756e 6374 696f 6e29 3a3a 2c0a 2020 2020 unction)::,. \n+00005060: 202a 6e6f 7465 2047 6574 5f43 6861 7220 *note Get_Char \n+00005070: 2866 756e 6374 696f 6e29 3a3a 2c0a 2020 (function)::,. \n+00005080: 2020 202a 6e6f 7465 2047 6574 5f4c 696e *note Get_Lin\n+00005090: 6520 2866 756e 6374 696f 6e29 3a3a 2c0a e (function)::,.\n+000050a0: 2020 2020 202a 6e6f 7465 2052 6563 6569 *note Recei\n+000050b0: 7665 2028 7072 6f63 6564 7572 6529 3a3a ve (procedure)::\n+000050c0: 2c0a 2020 2020 202a 6e6f 7465 2053 6574 ,. *note Set\n+000050d0: 5f42 7566 6665 7220 2870 726f 6365 6475 _Buffer (procedu\n+000050e0: 7265 293a 3a2e 0a0a 1f0a 4669 6c65 3a20 re)::.....File: \n+000050f0: 6164 6173 6f63 6b65 7473 2e69 6e66 6f2c adasockets.info,\n+00005100: 2020 4e6f 6465 3a20 4765 745f 5265 6365 Node: Get_Rece\n+00005110: 6976 655f 5175 6575 655f 5369 7a65 2028 ive_Queue_Size (\n+00005120: 6675 6e63 7469 6f6e 292c 2020 4e65 7874 function), Next\n+00005130: 3a20 4765 745f 5365 6e64 5f51 7565 7565 : Get_Send_Queue\n+00005140: 5f53 697a 6520 2866 756e 6374 696f 6e29 _Size (function)\n+00005150: 2c20 2050 7265 763a 2047 6574 5f4c 696e , Prev: Get_Lin\n+00005160: 6520 2870 726f 6365 6475 7265 292c 2020 e (procedure), \n+00005170: 5570 3a20 4163 6365 7074 5f53 6f63 6b65 Up: Accept_Socke\n+00005180: 7420 2870 726f 6365 6475 7265 290a 0a47 t (procedure)..G\n+00005190: 6574 5f52 6563 6569 7665 5f51 7565 7565 et_Receive_Queue\n+000051a0: 5f53 697a 6520 2866 756e 6374 696f 6e29 _Size (function)\n+000051b0: 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d .---------------\n+000051c0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n+000051d0: 2d2d 0a0a 5055 5250 4f53 450a 2020 2020 --..PURPOSE. \n+000051e0: 2052 6574 7572 6e20 7468 6520 7369 7a65 Return the size\n+000051f0: 206f 6620 7468 6520 756e 7265 6164 2064 of the unread d\n+00005200: 6174 6120 696e 2074 6865 2069 6e70 7574 ata in the input\n+00005210: 2071 7565 7565 0a50 524f 544f 5459 5045 queue.PROTOTYPE\n+00005220: 0a20 2020 2020 202d 2d20 536f 636b 6574 . -- Socket\n+00005230: 732e 4765 745f 5265 6365 6976 655f 5175 s.Get_Receive_Qu\n+00005240: 6575 655f 5369 7a65 3a20 6675 6e63 7469 eue_Size: functi\n+00005250: 6f6e 2047 6574 5f52 6563 6569 7665 5f51 on Get_Receive_Q\n+00005260: 7565 7565 5f53 697a 650a 2020 2020 2020 ueue_Size. \n+00005270: 2020 2020 2020 2020 2028 534f 434b 4554 (SOCKET\n+00005280: 203a 2053 6f63 6b65 745f 4644 2743 6c61 : Socket_FD'Cla\n+00005290: 7373 290a 2020 2020 2020 2020 2020 2020 ss). \n+000052a0: 2020 2072 6574 7572 6e20 496e 7465 6765 return Intege\n+000052b0: 723b 0a0a 5041 5241 4d45 5445 5253 0a20 r;..PARAMETERS. \n+000052c0: 2020 2020 534f 434b 4554 2020 2020 2069 SOCKET i\n+000052d0: 6e20 2020 2020 2020 2020 496e 6974 6961 n Initia\n+000052e0: 6c69 7a65 6420 616e 6420 636f 6e6e 6563 lized and connec\n+000052f0: 7465 6420 736f 636b 6574 206f 626a 6563 ted socket objec\n+00005300: 740a 0a52 4554 5552 4e20 5641 4c55 450a t..RETURN VALUE.\n+00005310: 2020 2020 2054 6865 206e 6f6e 2d6e 6567 The non-neg\n+00005320: 6174 6976 6520 7369 7a65 2069 6e20 6279 ative size in by\n+00005330: 7465 7320 6f66 2074 6865 2069 6e70 7574 tes of the input\n+00005340: 2071 7565 7565 0a0a 4445 5343 5249 5054 queue..DESCRIPT\n+00005350: 494f 4e0a 2020 2020 2054 6869 7320 6675 ION. This fu\n+00005360: 6e63 7469 6f6e 2069 7320 6f6e 6c79 2061 nction is only a\n+00005370: 7661 696c 6162 6c65 206f 6e20 4c69 6e75 vailable on Linu\n+00005380: 7820 706c 6174 666f 726d 732e 2020 4f6e x platforms. On\n+00005390: 206f 7468 6572 0a20 2020 2020 6f70 6572 other. oper\n+000053a0: 6174 696e 6720 7379 7374 656d 732c 2069 ating systems, i\n+000053b0: 7420 7769 6c6c 2072 6574 7572 6e20 2d32 t will return -2\n+000053c0: 2074 6f20 696e 6469 6361 7465 2074 6861 to indicate tha\n+000053d0: 7420 7468 6520 6e65 6365 7373 6172 790a t the necessary.\n+000053e0: 2020 2020 206d 6563 6861 6e69 736d 7320 mechanisms \n+000053f0: 746f 2072 6574 7269 6576 6520 7468 6520 to retrieve the \n+00005400: 696e 666f 726d 6174 696f 6e20 6172 6520 information are \n+00005410: 6e6f 7420 6176 6169 6c61 626c 652e 0a0a not available...\n+00005420: 5345 4520 414c 534f 0a20 2020 2020 2a6e SEE ALSO. *n\n+00005430: 6f74 6520 5265 6365 6976 6520 2870 726f ote Receive (pro\n+00005440: 6365 6475 7265 293a 3a2e 0a0a 1f0a 4669 cedure)::.....Fi\n+00005450: 6c65 3a20 6164 6173 6f63 6b65 7473 2e69 le: adasockets.i\n+00005460: 6e66 6f2c 2020 4e6f 6465 3a20 4765 745f nfo, Node: Get_\n+00005470: 5365 6e64 5f51 7565 7565 5f53 697a 6520 Send_Queue_Size \n+00005480: 2866 756e 6374 696f 6e29 2c20 204e 6578 (function), Nex\n+00005490: 743a 2047 6574 736f 636b 6f70 7420 2870 t: Getsockopt (p\n+000054a0: 726f 6365 6475 7265 292c 2020 5072 6576 rocedure), Prev\n+000054b0: 3a20 4765 745f 5265 6365 6976 655f 5175 : Get_Receive_Qu\n+000054c0: 6575 655f 5369 7a65 2028 6675 6e63 7469 eue_Size (functi\n+000054d0: 6f6e 292c 2020 5570 3a20 4163 6365 7074 on), Up: Accept\n+000054e0: 5f53 6f63 6b65 7420 2870 726f 6365 6475 _Socket (procedu\n+000054f0: 7265 290a 0a47 6574 5f53 656e 645f 5175 re)..Get_Send_Qu\n+00005500: 6575 655f 5369 7a65 2028 6675 6e63 7469 eue_Size (functi\n+00005510: 6f6e 290a 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d on).------------\n+00005520: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n+00005530: 2d2d 0a0a 5055 5250 4f53 450a 2020 2020 --..PURPOSE. \n+00005540: 2052 6574 7572 6e20 7468 6520 7369 7a65 Return the size\n+00005550: 206f 6620 7468 6520 756e 7365 6e74 2064 of the unsent d\n+00005560: 6174 6120 696e 2074 6865 206f 7574 7075 ata in the outpu\n+00005570: 7420 7175 6575 650a 5052 4f54 4f54 5950 t queue.PROTOTYP\n+00005580: 450a 2020 2020 2020 2d2d 2053 6f63 6b65 E. -- Socke\n+00005590: 7473 2e47 6574 5f53 656e 645f 5175 6575 ts.Get_Send_Queu\n+000055a0: 655f 5369 7a65 3a20 6675 6e63 7469 6f6e e_Size: function\n+000055b0: 2047 6574 5f53 656e 645f 5175 6575 655f Get_Send_Queue_\n+000055c0: 5369 7a65 0a20 2020 2020 2020 2020 2020 Size. \n+000055d0: 2020 2020 2853 4f43 4b45 5420 3a20 536f (SOCKET : So\n+000055e0: 636b 6574 5f46 4427 436c 6173 7329 0a20 cket_FD'Class). \n+000055f0: 2020 2020 2020 2020 2020 2020 2020 7265 re\n+00005600: 7475 726e 2049 6e74 6567 6572 3b0a 0a50 turn Integer;..P\n+00005610: 4152 414d 4554 4552 530a 2020 2020 2053 ARAMETERS. S\n+00005620: 4f43 4b45 5420 2020 2020 696e 2020 2020 OCKET in \n+00005630: 2020 2020 2049 6e69 7469 616c 697a 6564 Initialized\n+00005640: 2061 6e64 2063 6f6e 6e65 6374 6564 2073 and connected s\n+00005650: 6f63 6b65 7420 6f62 6a65 6374 0a0a 5245 ocket object..RE\n+00005660: 5455 524e 2056 414c 5545 0a20 2020 2020 TURN VALUE. \n+00005670: 5468 6520 6e6f 6e2d 6e65 6761 7469 7665 The non-negative\n+00005680: 2073 697a 6520 696e 2062 7974 6573 206f size in bytes o\n+00005690: 6620 7468 6520 6f75 7470 7574 2071 7565 f the output que\n+000056a0: 7565 0a0a 4445 5343 5249 5054 494f 4e0a ue..DESCRIPTION.\n+000056b0: 2020 2020 2054 6869 7320 6675 6e63 7469 This functi\n+000056c0: 6f6e 2069 7320 6f6e 6c79 2061 7661 696c on is only avail\n+000056d0: 6162 6c65 206f 6e20 4c69 6e75 7820 706c able on Linux pl\n+000056e0: 6174 666f 726d 732e 2020 4f6e 206f 7468 atforms. On oth\n+000056f0: 6572 0a20 2020 2020 6f70 6572 6174 696e er. operatin\n+00005700: 6720 7379 7374 656d 732c 2069 7420 7769 g systems, it wi\n+00005710: 6c6c 2072 6574 7572 6e20 2d32 2074 6f20 ll return -2 to \n+00005720: 696e 6469 6361 7465 2074 6861 7420 7468 indicate that th\n+00005730: 6520 6e65 6365 7373 6172 790a 2020 2020 e necessary. \n+00005740: 206d 6563 6861 6e69 736d 7320 746f 2072 mechanisms to r\n+00005750: 6574 7269 6576 6520 7468 6520 696e 666f etrieve the info\n+00005760: 726d 6174 696f 6e20 6172 6520 6e6f 7420 rmation are not \n+00005770: 6176 6169 6c61 626c 652e 0a0a 5345 4520 available...SEE \n+00005780: 414c 534f 0a20 2020 2020 2a6e 6f74 6520 ALSO. *note \n+00005790: 5365 6e64 2028 7072 6f63 6564 7572 6529 Send (procedure)\n+000057a0: 3a3a 2e0a 0a1f 0a46 696c 653a 2061 6461 ::.....File: ada\n+000057b0: 736f 636b 6574 732e 696e 666f 2c20 204e sockets.info, N\n+000057c0: 6f64 653a 2047 6574 736f 636b 6f70 7420 ode: Getsockopt \n+000057d0: 2870 726f 6365 6475 7265 292c 2020 4e65 (procedure), Ne\n+000057e0: 7874 3a20 4c69 7374 656e 2028 7072 6f63 xt: Listen (proc\n+000057f0: 6564 7572 6529 2c20 2050 7265 763a 2047 edure), Prev: G\n+00005800: 6574 5f53 656e 645f 5175 6575 655f 5369 et_Send_Queue_Si\n+00005810: 7a65 2028 6675 6e63 7469 6f6e 292c 2020 ze (function), \n+00005820: 5570 3a20 4163 6365 7074 5f53 6f63 6b65 Up: Accept_Socke\n+00005830: 7420 2870 726f 6365 6475 7265 290a 0a47 t (procedure)..G\n+00005840: 6574 736f 636b 6f70 7420 2870 726f 6365 etsockopt (proce\n+00005850: 6475 7265 290a 2d2d 2d2d 2d2d 2d2d 2d2d dure).----------\n+00005860: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 0a0a 5055 ------------..PU\n+00005870: 5250 4f53 450a 2020 2020 2052 6574 7269 RPOSE. Retri\n+00005880: 6576 6520 6120 736f 636b 6574 206f 7074 eve a socket opt\n+00005890: 696f 6e0a 5052 4f54 4f54 5950 450a 2020 ion.PROTOTYPE. \n+000058a0: 2020 2020 2d2d 2053 6f63 6b65 7473 2e47 -- Sockets.G\n+000058b0: 6574 736f 636b 6f70 743a 2070 726f 6365 etsockopt: proce\n+000058c0: 6475 7265 2047 6574 736f 636b 6f70 7420 dure Getsockopt \n+000058d0: 2853 4f43 4b45 5420 3a20 536f 636b 6574 (SOCKET : Socket\n+000058e0: 5f46 443b 0a20 2020 2020 2020 2020 2020 _FD;. \n+000058f0: 2020 2020 4c45 5645 4c20 3a20 536f 636b LEVEL : Sock\n+00005900: 6574 5f4c 6576 656c 203a 3d20 534f 4c5f et_Level := SOL_\n+00005910: 534f 434b 4554 3b0a 2020 2020 2020 2020 SOCKET;. \n+00005920: 2020 2020 2020 204f 5054 4e41 4d45 203a OPTNAME :\n+00005930: 2053 6f63 6b65 745f 4f70 7469 6f6e 3b20 Socket_Option; \n+00005940: 4f50 5456 414c 203a 206f 7574 2049 6e74 OPTVAL : out Int\n+00005950: 6567 6572 293b 0a0a 5041 5241 4d45 5445 eger);..PARAMETE\n+00005960: 5253 0a20 2020 2020 534f 434b 4554 2020 RS. SOCKET \n+00005970: 2020 2069 6e20 2020 2020 2020 2020 496e in In\n+00005980: 6974 6961 6c69 7a65 6420 616e 6420 626f itialized and bo\n+00005990: 756e 6420 736f 636b 6574 206f 626a 6563 und socket objec\n+000059a0: 740a 2020 2020 204c 4556 454c 2020 2020 t. LEVEL \n+000059b0: 2020 696e 2020 2020 2020 2020 2050 726f in Pro\n+000059c0: 746f 636f 6c20 6c65 7665 6c0a 2020 2020 tocol level. \n+000059d0: 204f 5054 4e41 4d45 2020 2020 696e 2020 OPTNAME in \n+000059e0: 2020 2020 2020 204f 7074 696f 6e20 6e61 Option na\n+000059f0: 6d65 0a20 2020 2020 4f50 5456 414c 2020 me. OPTVAL \n+00005a00: 2020 206f 7574 2020 2020 2020 2020 4f70 out Op\n+00005a10: 7469 6f6e 2076 616c 7565 0a0a 4445 5343 tion value..DESC\n+00005a20: 5249 5054 494f 4e0a 2020 2020 2054 6869 RIPTION. Thi\n+00005a30: 7320 7072 6f63 6564 7572 6520 7265 7472 s procedure retr\n+00005a40: 6965 7665 7320 6f70 7469 6f6e 7320 6170 ieves options ap\n+00005a50: 706c 6963 6162 6c65 2074 6f20 6120 736f plicable to a so\n+00005a60: 636b 6574 2e20 2050 6c65 6173 650a 2020 cket. Please. \n+00005a70: 2020 2073 6565 2079 6f75 7220 6f70 6572 see your oper\n+00005a80: 6174 696e 6720 7379 7374 656d 206d 616e ating system man\n+00005a90: 7561 6c20 666f 7220 7573 6162 6c65 206c ual for usable l\n+00005aa0: 6576 656c 7320 616e 6420 6f70 7469 6f6e evels and option\n+00005ab0: 732e 0a0a 2020 2020 2054 776f 206c 6576 s... Two lev\n+00005ac0: 656c 7320 6172 6520 6465 6669 6e65 643a els are defined:\n+00005ad0: 20e2 8098 534f 4c5f 534f 434b 4554 e280 ...SOL_SOCKET..\n+00005ae0: 9920 2874 6865 2064 6566 6175 6c74 2920 . (the default) \n+00005af0: 616e 640a 2020 2020 20e2 8098 4950 5052 and. ...IPPR\n+00005b00: 4f54 4f5f 4950 e280 992e 2020 5468 6520 OTO_IP.... The \n+00005b10: 6f70 7469 6f6e 7320 6172 6520 e280 9853 options are ...S\n+00005b20: 4f5f 5245 5553 4541 4444 52e2 8099 2c20 O_REUSEADDR..., \n+00005b30: e280 9853 4f5f 5245 5553 4550 4f52 54e2 ...SO_REUSEPORT.\n+00005b40: 8099 2c0a 2020 2020 20e2 8098 4950 5f4d ..,. ...IP_M\n+00005b50: 554c 5449 4341 5354 5f54 544c e280 992c ULTICAST_TTL...,\n+00005b60: 20e2 8098 4950 5f41 4444 5f4d 454d 4245 ...IP_ADD_MEMBE\n+00005b70: 5253 4849 50e2 8099 2c20 e280 9849 505f RSHIP..., ...IP_\n+00005b80: 4452 4f50 5f4d 454d 4245 5253 4849 50e2 DROP_MEMBERSHIP.\n+00005b90: 8099 2c0a 2020 2020 20e2 8098 4950 5f4d ..,. ...IP_M\n+00005ba0: 554c 5449 4341 5354 5f4c 4f4f 50e2 8099 ULTICAST_LOOP...\n+00005bb0: 2c20 e280 9853 4f5f 534e 4442 5546 e280 , ...SO_SNDBUF..\n+00005bc0: 9920 616e 6420 e280 9849 505f 5243 5642 . and ...IP_RCVB\n+00005bd0: 5546 e280 992e 0a0a 2020 2020 204e 6f74 UF...... Not\n+00005be0: 6520 7468 6174 2075 6e6c 696b 6520 7468 e that unlike th\n+00005bf0: 6569 7220 4320 6c61 6e67 7561 6765 2063 eir C language c\n+00005c00: 6f75 6e74 6572 7061 7274 2c20 e280 9847 ounterpart, ...G\n+00005c10: 6574 736f 636b 6f70 74e2 8099 2061 6e64 etsockopt... and\n+00005c20: 0a20 2020 2020 e280 9853 6574 736f 636b . ...Setsock\n+00005c30: 6f70 74e2 8099 2064 6f20 6e6f 7420 7265 opt... do not re\n+00005c40: 7175 6972 6520 616e 2065 7874 7261 2070 quire an extra p\n+00005c50: 6172 616d 6574 6572 2072 6570 7265 7365 arameter represe\n+00005c60: 6e74 696e 6720 7468 650a 2020 2020 206c nting the. l\n+00005c70: 656e 6774 6820 696e 2062 7974 6573 206f ength in bytes o\n+00005c80: 6620 7468 6520 6f70 7469 6f6e 2076 616c f the option val\n+00005c90: 7565 2e20 2041 6461 536f 636b 6574 7320 ue. AdaSockets \n+00005ca0: 6b6e 6f77 7320 7468 6520 7269 6768 740a knows the right.\n+00005cb0: 2020 2020 2073 697a 6520 666f 7220 6576 size for ev\n+00005cc0: 6572 7920 6f70 7469 6f6e 2e0a 0a53 4545 ery option...SEE\n+00005cd0: 2041 4c53 4f0a 2020 2020 202a 6e6f 7465 ALSO. *note\n+00005ce0: 2053 6574 736f 636b 6f70 7420 2870 726f Setsockopt (pro\n+00005cf0: 6365 6475 7265 293a 3a2e 0a0a 1f0a 4669 cedure)::.....Fi\n+00005d00: 6c65 3a20 6164 6173 6f63 6b65 7473 2e69 le: adasockets.i\n+00005d10: 6e66 6f2c 2020 4e6f 6465 3a20 4c69 7374 nfo, Node: List\n+00005d20: 656e 2028 7072 6f63 6564 7572 6529 2c20 en (procedure), \n+00005d30: 204e 6578 743a 204e 6577 5f4c 696e 6520 Next: New_Line \n+00005d40: 2870 726f 6365 6475 7265 292c 2020 5072 (procedure), Pr\n+00005d50: 6576 3a20 4765 7473 6f63 6b6f 7074 2028 ev: Getsockopt (\n+00005d60: 7072 6f63 6564 7572 6529 2c20 2055 703a procedure), Up:\n+00005d70: 2041 6363 6570 745f 536f 636b 6574 2028 Accept_Socket (\n+00005d80: 7072 6f63 6564 7572 6529 0a0a 4c69 7374 procedure)..List\n+00005d90: 656e 2028 7072 6f63 6564 7572 6529 0a2d en (procedure).-\n+00005da0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n+00005db0: 2d0a 0a50 5552 504f 5345 0a20 2020 2020 -..PURPOSE. \n+00005dc0: 4573 7461 626c 6973 6820 6120 6c69 7374 Establish a list\n+00005dd0: 656e 2071 7565 7565 0a50 524f 544f 5459 en queue.PROTOTY\n+00005de0: 5045 0a20 2020 2020 202d 2d20 536f 636b PE. -- Sock\n+00005df0: 6574 732e 4c69 7374 656e 3a20 7072 6f63 ets.Listen: proc\n+00005e00: 6564 7572 6520 4c69 7374 656e 2028 534f edure Listen (SO\n+00005e10: 434b 4554 203a 2053 6f63 6b65 745f 4644 CKET : Socket_FD\n+00005e20: 3b0a 2020 2020 2020 2020 2020 2020 2020 ;. \n+00005e30: 2051 5545 5545 5f53 495a 4520 3a20 506f QUEUE_SIZE : Po\n+00005e40: 7369 7469 7665 203a 3d20 3529 3b0a 0a50 sitive := 5);..P\n+00005e50: 4152 414d 4554 4552 530a 2020 2020 2053 ARAMETERS. S\n+00005e60: 4f43 4b45 5420 2020 2020 696e 2020 2020 OCKET in \n+00005e70: 2020 2020 2049 6e69 7469 616c 697a 6564 Initialized\n+00005e80: 2061 6e64 2062 6f75 6e64 2073 6f63 6b65 and bound socke\n+00005e90: 7420 6f62 6a65 6374 0a20 2020 2020 5155 t object. QU\n+00005ea0: 4555 455f 5349 5a45 2069 6e20 2020 2020 EUE_SIZE in \n+00005eb0: 2020 2020 5265 7175 6573 7465 6420 736c Requested sl\n+00005ec0: 6f74 7320 696e 2074 6865 206c 6973 7465 ots in the liste\n+00005ed0: 6e20 7175 6575 650a 0a44 4553 4352 4950 n queue..DESCRIP\n+00005ee0: 5449 4f4e 0a20 2020 2020 5468 6973 2070 TION. This p\n+00005ef0: 726f 6365 6475 7265 2065 7374 6162 6c69 rocedure establi\n+00005f00: 7368 6573 2061 206c 6973 7465 6e20 7175 shes a listen qu\n+00005f10: 6575 6520 6166 7465 7220 6120 5443 5020 eue after a TCP \n+00005f20: 736f 636b 6574 2061 730a 2020 2020 2062 socket as. b\n+00005f30: 6565 6e20 696e 6974 6961 6c69 7a65 6420 een initialized \n+00005f40: 616e 6420 626f 756e 642e 2020 4561 6368 and bound. Each\n+00005f50: 2073 6c6f 7420 696e 2074 6865 2071 7565 slot in the que\n+00005f60: 7565 2063 616e 2068 6f6c 6420 6f6e 650a ue can hold one.\n+00005f70: 2020 2020 2069 6e63 6f6d 696e 6720 636f incoming co\n+00005f80: 6e6e 6563 7469 6f6e 2074 6861 7420 6861 nnection that ha\n+00005f90: 7320 6e6f 7420 6265 656e 2061 6363 6570 s not been accep\n+00005fa0: 7465 6420 7965 742e 2020 4e6f 7465 2074 ted yet. Note t\n+00005fb0: 6861 7420 6d6f 7374 0a20 2020 2020 6f70 hat most. op\n+00005fc0: 6572 6174 696e 6720 7379 7374 656d 7320 erating systems \n+00005fd0: 6967 6e6f 7265 2071 7565 7565 2073 697a ignore queue siz\n+00005fe0: 6573 206c 6172 6765 7220 7468 616e 2066 es larger than f\n+00005ff0: 6976 652e 0a0a 5345 4520 414c 534f 0a20 ive...SEE ALSO. \n+00006000: 2020 2020 2a6e 6f74 6520 4163 6365 7074 *note Accept\n+00006010: 5f53 6f63 6b65 7420 2870 726f 6365 6475 _Socket (procedu\n+00006020: 7265 293a 3a2c 0a20 2020 2020 2a6e 6f74 re)::,. *not\n+00006030: 6520 4269 6e64 2028 7072 6f63 6564 7572 e Bind (procedur\n+00006040: 6529 3a3a 2c0a 2020 2020 202a 6e6f 7465 e)::,. *note\n+00006050: 2053 6f63 6b65 7420 2870 726f 6365 6475 Socket (procedu\n+00006060: 7265 293a 3a2e 0a0a 1f0a 4669 6c65 3a20 re)::.....File: \n+00006070: 6164 6173 6f63 6b65 7473 2e69 6e66 6f2c adasockets.info,\n+00006080: 2020 4e6f 6465 3a20 4e65 775f 4c69 6e65 Node: New_Line\n+00006090: 2028 7072 6f63 6564 7572 6529 2c20 204e (procedure), N\n+000060a0: 6578 743a 2050 7574 2028 7072 6f63 6564 ext: Put (proced\n+000060b0: 7572 6529 2c20 2050 7265 763a 204c 6973 ure), Prev: Lis\n+000060c0: 7465 6e20 2870 726f 6365 6475 7265 292c ten (procedure),\n+000060d0: 2020 5570 3a20 4163 6365 7074 5f53 6f63 Up: Accept_Soc\n+000060e0: 6b65 7420 2870 726f 6365 6475 7265 290a ket (procedure).\n+000060f0: 0a4e 6577 5f4c 696e 6520 2870 726f 6365 .New_Line (proce\n+00006100: 6475 7265 290a 2d2d 2d2d 2d2d 2d2d 2d2d dure).----------\n+00006110: 2d2d 2d2d 2d2d 2d2d 2d2d 0a0a 5055 5250 ----------..PURP\n+00006120: 4f53 450a 2020 2020 2053 656e 6420 6120 OSE. Send a \n+00006130: 4352 2f4c 4620 746f 2061 2072 656d 6f74 CR/LF to a remot\n+00006140: 6520 686f 7374 0a50 524f 544f 5459 5045 e host.PROTOTYPE\n+00006150: 0a20 2020 2020 202d 2d20 536f 636b 6574 . -- Socket\n+00006160: 732e 4e65 775f 4c69 6e65 3a20 7072 6f63 s.New_Line: proc\n+00006170: 6564 7572 6520 4e65 775f 4c69 6e65 2028 edure New_Line (\n+00006180: 534f 434b 4554 203a 2053 6f63 6b65 745f SOCKET : Socket_\n+00006190: 4644 2743 6c61 7373 3b0a 2020 2020 2020 FD'Class;. \n+000061a0: 2020 2020 2020 2020 2043 4f55 4e54 203a COUNT :\n+000061b0: 204e 6174 7572 616c 203a 3d20 3129 3b0a Natural := 1);.\n+000061c0: 0a50 4152 414d 4554 4552 530a 2020 2020 .PARAMETERS. \n+000061d0: 2053 4f43 4b45 5420 2020 2020 696e 2020 SOCKET in \n+000061e0: 2020 2020 2020 2049 6e69 7469 616c 697a Initializ\n+000061f0: 6564 2061 6e64 2063 6f6e 6e65 6374 6564 ed and connected\n+00006200: 2073 6f63 6b65 7420 6f62 6a65 6374 0a20 socket object. \n+00006210: 2020 2020 434f 554e 5420 2020 2020 2069 COUNT i\n+00006220: 6e20 2020 2020 2020 2020 4e75 6d62 6572 n Number\n+00006230: 206f 6620 4352 2f4c 4620 7365 7175 656e of CR/LF sequen\n+00006240: 6365 7320 746f 2073 656e 640a 0a44 4553 ces to send..DES\n+00006250: 4352 4950 5449 4f4e 0a20 2020 2020 5468 CRIPTION. Th\n+00006260: 6973 2070 726f 6365 6475 7265 2073 656e is procedure sen\n+00006270: 6473 206f 6e65 206f 7220 6d6f 7265 2043 ds one or more C\n+00006280: 522f 4c46 2063 6f6d 6269 6e61 7469 6f6e R/LF combination\n+00006290: 7320 746f 2074 6865 2070 6565 722e 0a0a s to the peer...\n+000062a0: 4558 4345 5054 494f 4e53 0a20 2020 2020 EXCEPTIONS. \n+000062b0: e280 9843 6f6e 6e65 6374 696f 6e5f 436c ...Connection_Cl\n+000062c0: 6f73 6564 e280 9950 6565 7220 6861 7320 osed...Peer has \n+000062d0: 7072 656d 6174 7572 656c 7920 636c 6f73 prematurely clos\n+000062e0: 6564 2074 6865 2063 6f6e 6e65 6374 696f ed the connectio\n+000062f0: 6e0a 0a53 4545 2041 4c53 4f0a 2020 2020 n..SEE ALSO. \n+00006300: 202a 6e6f 7465 2050 7574 2028 7072 6f63 *note Put (proc\n+00006310: 6564 7572 6529 3a3a 2c0a 2020 2020 202a edure)::,. *\n+00006320: 6e6f 7465 2050 7574 5f4c 696e 6520 2870 note Put_Line (p\n+00006330: 726f 6365 6475 7265 293a 3a2e 0a0a 1f0a rocedure)::.....\n+00006340: 4669 6c65 3a20 6164 6173 6f63 6b65 7473 File: adasockets\n+00006350: 2e69 6e66 6f2c 2020 4e6f 6465 3a20 5075 .info, Node: Pu\n+00006360: 7420 2870 726f 6365 6475 7265 292c 2020 t (procedure), \n+00006370: 4e65 7874 3a20 5075 745f 4c69 6e65 2028 Next: Put_Line (\n+00006380: 7072 6f63 6564 7572 6529 2c20 2050 7265 procedure), Pre\n+00006390: 763a 204e 6577 5f4c 696e 6520 2870 726f v: New_Line (pro\n+000063a0: 6365 6475 7265 292c 2020 5570 3a20 4163 cedure), Up: Ac\n+000063b0: 6365 7074 5f53 6f63 6b65 7420 2870 726f cept_Socket (pro\n+000063c0: 6365 6475 7265 290a 0a50 7574 2028 7072 cedure)..Put (pr\n+000063d0: 6f63 6564 7572 6529 0a2d 2d2d 2d2d 2d2d ocedure).-------\n+000063e0: 2d2d 2d2d 2d2d 2d2d 0a0a 5055 5250 4f53 --------..PURPOS\n+000063f0: 450a 2020 2020 2053 656e 6420 6120 7374 E. Send a st\n+00006400: 7269 6e67 2074 6f20 6120 7265 6d6f 7465 ring to a remote\n+00006410: 2068 6f73 740a 5052 4f54 4f54 5950 450a host.PROTOTYPE.\n+00006420: 2020 2020 2020 2d2d 2053 6f63 6b65 7473 -- Sockets\n+00006430: 2e50 7574 3a20 7072 6f63 6564 7572 6520 .Put: procedure \n+00006440: 5075 7420 2853 4f43 4b45 5420 3a20 536f Put (SOCKET : So\n+00006450: 636b 6574 5f46 4427 436c 6173 733b 0a20 cket_FD'Class;. \n+00006460: 2020 2020 2020 2020 2020 2020 2020 5354 ST\n+00006470: 5220 3a20 5374 7269 6e67 293b 0a0a 5041 R : String);..PA\n+00006480: 5241 4d45 5445 5253 0a20 2020 2020 534f RAMETERS. SO\n+00006490: 434b 4554 2020 2020 2069 6e20 2020 2020 CKET in \n+000064a0: 2020 2020 496e 6974 6961 6c69 7a65 6420 Initialized \n+000064b0: 616e 6420 636f 6e6e 6563 7465 6420 736f and connected so\n+000064c0: 636b 6574 206f 626a 6563 740a 2020 2020 cket object. \n+000064d0: 2053 5452 2020 2020 2020 2020 696e 2020 STR in \n+000064e0: 2020 2020 2020 2053 7472 696e 6720 746f String to\n+000064f0: 2073 656e 640a 0a44 4553 4352 4950 5449 send..DESCRIPTI\n+00006500: 4f4e 0a20 2020 2020 5468 6973 2070 726f ON. This pro\n+00006510: 6365 6475 7265 2073 656e 6473 2074 6865 cedure sends the\n+00006520: 2063 6f6e 7465 6e74 206f 6620 5354 5220 content of STR \n+00006530: 6f76 6572 2061 6e20 6f75 7467 6f69 6e67 over an outgoing\n+00006540: 206f 720a 2020 2020 2069 6e63 6f6d 696e or. incomin\n+00006550: 6720 736f 636b 6574 2e0a 0a45 5843 4550 g socket...EXCEP\n+00006560: 5449 4f4e 530a 2020 2020 20e2 8098 436f TIONS. ...Co\n+00006570: 6e6e 6563 7469 6f6e 5f43 6c6f 7365 64e2 nnection_Closed.\n+00006580: 8099 5065 6572 2068 6173 2070 7265 6d61 ..Peer has prema\n+00006590: 7475 7265 6c79 2063 6c6f 7365 6420 7468 turely closed th\n+000065a0: 6520 636f 6e6e 6563 7469 6f6e 0a0a 5345 e connection..SE\n+000065b0: 4520 414c 534f 0a20 2020 2020 2a6e 6f74 E ALSO. *not\n+000065c0: 6520 4e65 775f 4c69 6e65 2028 7072 6f63 e New_Line (proc\n+000065d0: 6564 7572 6529 3a3a 2c0a 2020 2020 202a edure)::,. *\n+000065e0: 6e6f 7465 2050 7574 5f4c 696e 6520 2870 note Put_Line (p\n+000065f0: 726f 6365 6475 7265 293a 3a2c 0a20 2020 rocedure)::,. \n+00006600: 2020 2a6e 6f74 6520 5365 6e64 2028 7072 *note Send (pr\n+00006610: 6f63 6564 7572 6529 3a3a 2e0a 0a1f 0a46 ocedure)::.....F\n+00006620: 696c 653a 2061 6461 736f 636b 6574 732e ile: adasockets.\n+00006630: 696e 666f 2c20 204e 6f64 653a 2050 7574 info, Node: Put\n+00006640: 5f4c 696e 6520 2870 726f 6365 6475 7265 _Line (procedure\n+00006650: 292c 2020 4e65 7874 3a20 5265 6365 6976 ), Next: Receiv\n+00006660: 6520 2866 756e 6374 696f 6e29 2c20 2050 e (function), P\n+00006670: 7265 763a 2050 7574 2028 7072 6f63 6564 rev: Put (proced\n+00006680: 7572 6529 2c20 2055 703a 2041 6363 6570 ure), Up: Accep\n+00006690: 745f 536f 636b 6574 2028 7072 6f63 6564 t_Socket (proced\n+000066a0: 7572 6529 0a0a 5075 745f 4c69 6e65 2028 ure)..Put_Line (\n+000066b0: 7072 6f63 6564 7572 6529 0a2d 2d2d 2d2d procedure).-----\n+000066c0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d0a ---------------.\n+000066d0: 0a50 5552 504f 5345 0a20 2020 2020 5365 .PURPOSE. Se\n+000066e0: 6e64 2061 2043 522f 4c46 2074 6572 6d69 nd a CR/LF termi\n+000066f0: 6e61 7465 6420 7374 7269 6e67 2074 6f20 nated string to \n+00006700: 6120 7265 6d6f 7465 2068 6f73 740a 5052 a remote host.PR\n+00006710: 4f54 4f54 5950 450a 2020 2020 2020 2d2d OTOTYPE. --\n+00006720: 2053 6f63 6b65 7473 2e50 7574 5f4c 696e Sockets.Put_Lin\n+00006730: 653a 2070 726f 6365 6475 7265 2050 7574 e: procedure Put\n+00006740: 5f4c 696e 6520 2853 4f43 4b45 5420 3a20 _Line (SOCKET : \n+00006750: 536f 636b 6574 5f46 4427 436c 6173 733b Socket_FD'Class;\n+00006760: 0a20 2020 2020 2020 2020 2020 2020 2020 . \n+00006770: 5354 5220 3a20 5374 7269 6e67 293b 0a0a STR : String);..\n+00006780: 5041 5241 4d45 5445 5253 0a20 2020 2020 PARAMETERS. \n+00006790: 534f 434b 4554 2020 2020 2069 6e20 2020 SOCKET in \n+000067a0: 2020 2020 2020 496e 6974 6961 6c69 7a65 Initialize\n+000067b0: 6420 616e 6420 636f 6e6e 6563 7465 6420 d and connected \n+000067c0: 736f 636b 6574 206f 626a 6563 740a 2020 socket object. \n+000067d0: 2020 2053 5452 2020 2020 2020 2020 696e STR in\n+000067e0: 2020 2020 2020 2020 2053 7472 696e 6720 String \n+000067f0: 746f 2073 656e 640a 0a44 4553 4352 4950 to send..DESCRIP\n+00006800: 5449 4f4e 0a20 2020 2020 5468 6973 2070 TION. This p\n+00006810: 726f 6365 6475 7265 2073 656e 6473 2074 rocedure sends t\n+00006820: 6865 2063 6f6e 7465 6e74 206f 6620 5354 he content of ST\n+00006830: 5220 706c 7573 2061 2043 522f 4c46 2063 R plus a CR/LF c\n+00006840: 6f6d 6269 6e61 7469 6f6e 0a20 2020 2020 ombination. \n+00006850: 6f76 6572 2061 6e20 6f75 7467 6f69 6e67 over an outgoing\n+00006860: 206f 7220 696e 636f 6d69 6e67 2073 6f63 or incoming soc\n+00006870: 6b65 742e 0a0a 4558 4345 5054 494f 4e53 ket...EXCEPTIONS\n+00006880: 0a20 2020 2020 e280 9843 6f6e 6e65 6374 . ...Connect\n+00006890: 696f 6e5f 436c 6f73 6564 e280 9950 6565 ion_Closed...Pee\n+000068a0: 7220 6861 7320 7072 656d 6174 7572 656c r has prematurel\n+000068b0: 7920 636c 6f73 6564 2074 6865 2063 6f6e y closed the con\n+000068c0: 6e65 6374 696f 6e0a 0a53 4545 2041 4c53 nection..SEE ALS\n+000068d0: 4f0a 2020 2020 202a 6e6f 7465 204e 6577 O. *note New\n+000068e0: 5f4c 696e 6520 2870 726f 6365 6475 7265 _Line (procedure\n+000068f0: 293a 3a2c 0a20 2020 2020 2a6e 6f74 6520 )::,. *note \n+00006900: 5075 7420 2870 726f 6365 6475 7265 293a Put (procedure):\n+00006910: 3a2c 0a20 2020 2020 2a6e 6f74 6520 5365 :,. *note Se\n+00006920: 6e64 2028 7072 6f63 6564 7572 6529 3a3a nd (procedure)::\n+00006930: 2e0a 0a1f 0a46 696c 653a 2061 6461 736f .....File: adaso\n+00006940: 636b 6574 732e 696e 666f 2c20 204e 6f64 ckets.info, Nod\n+00006950: 653a 2052 6563 6569 7665 2028 6675 6e63 e: Receive (func\n+00006960: 7469 6f6e 292c 2020 4e65 7874 3a20 5265 tion), Next: Re\n+00006970: 6365 6976 6520 2870 726f 6365 6475 7265 ceive (procedure\n+00006980: 292c 2020 5072 6576 3a20 5075 745f 4c69 ), Prev: Put_Li\n+00006990: 6e65 2028 7072 6f63 6564 7572 6529 2c20 ne (procedure), \n+000069a0: 2055 703a 2041 6363 6570 745f 536f 636b Up: Accept_Sock\n+000069b0: 6574 2028 7072 6f63 6564 7572 6529 0a0a et (procedure)..\n+000069c0: 5265 6365 6976 6520 2866 756e 6374 696f Receive (functio\n+000069d0: 6e29 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d n).-------------\n+000069e0: 2d2d 2d2d 2d0a 0a50 5552 504f 5345 0a20 -----..PURPOSE. \n+000069f0: 2020 2020 5265 6365 6976 6520 7261 7720 Receive raw \n+00006a00: 6461 7461 206f 7665 7220 6120 736f 636b data over a sock\n+00006a10: 6574 0a50 524f 544f 5459 5045 0a20 2020 et.PROTOTYPE. \n+00006a20: 2020 202d 2d20 536f 636b 6574 732e 5265 -- Sockets.Re\n+00006a30: 6365 6976 653a 2066 756e 6374 696f 6e20 ceive: function \n+00006a40: 5265 6365 6976 6520 2853 4f43 4b45 5420 Receive (SOCKET \n+00006a50: 3a20 536f 636b 6574 5f46 443b 0a20 2020 : Socket_FD;. \n+00006a60: 2020 2020 2020 2020 2020 2020 4d41 5820 MAX \n+00006a70: 3a20 4164 612e 5374 7265 616d 732e 5374 : Ada.Streams.St\n+00006a80: 7265 616d 5f45 6c65 6d65 6e74 5f43 6f75 ream_Element_Cou\n+00006a90: 6e74 203a 3d20 3430 3936 290a 2020 2020 nt := 4096). \n+00006aa0: 2020 2020 2020 2020 2020 2072 6574 7572 retur\n+00006ab0: 6e20 4164 612e 5374 7265 616d 732e 5374 n Ada.Streams.St\n+00006ac0: 7265 616d 5f45 6c65 6d65 6e74 5f41 7272 ream_Element_Arr\n+00006ad0: 6179 3b0a 0a50 4152 414d 4554 4552 530a ay;..PARAMETERS.\n+00006ae0: 2020 2020 2053 4f43 4b45 5420 2020 2020 SOCKET \n+00006af0: 696e 2020 2020 2020 2020 2049 6e69 7469 in Initi\n+00006b00: 616c 697a 6564 2061 6e64 2062 6f75 6e64 alized and bound\n+00006b10: 206f 7220 636f 6e6e 6563 7465 640a 2020 or connected. \n+00006b20: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00006b30: 2020 2020 2020 2020 2073 6f63 6b65 7420 socket \n+00006b40: 6f62 6a65 6374 0a20 2020 2020 4d41 5820 object. MAX \n+00006b50: 2020 2020 2020 2069 6e20 2020 2020 2020 in \n+00006b60: 2020 4d61 7869 6d75 6d20 6461 7461 206c Maximum data l\n+00006b70: 656e 6774 680a 0a52 4554 5552 4e20 5641 ength..RETURN VA\n+00006b80: 4c55 450a 2020 2020 2052 6563 6569 7665 LUE. Receive\n+00006b90: 6420 7261 7720 6461 7461 0a0a 4445 5343 d raw data..DESC\n+00006ba0: 5249 5054 494f 4e0a 2020 2020 2054 6869 RIPTION. Thi\n+00006bb0: 7320 7072 6f63 6564 7572 6520 7265 6365 s procedure rece\n+00006bc0: 6976 6573 2064 6174 6120 6672 6f6d 2061 ives data from a\n+00006bd0: 2062 6f75 6e64 2055 4450 2073 6f63 6b65 bound UDP socke\n+00006be0: 7420 6f72 2061 2063 6f6e 6e65 6374 6564 t or a connected\n+00006bf0: 0a20 2020 2020 5443 5020 736f 636b 6574 . TCP socket\n+00006c00: 2e20 204f 6e6c 7920 6f6e 6520 7379 7374 . Only one syst\n+00006c10: 656d 2063 616c 6c20 7769 6c6c 2062 6520 em call will be \n+00006c20: 7065 7266 6f72 6d65 643b 2074 6869 7320 performed; this \n+00006c30: 6675 6e63 7469 6f6e 0a20 2020 2020 7769 function. wi\n+00006c40: 6c6c 2072 6574 7572 6e20 7768 6174 6576 ll return whatev\n+00006c50: 6572 2064 6174 6120 6861 7320 6172 7269 er data has arri\n+00006c60: 7665 642e 2020 4e6f 7465 2074 6861 7420 ved. Note that \n+00006c70: 696e 2047 4e41 5420 7468 650a 2020 2020 in GNAT the. \n+00006c80: 2073 6563 6f6e 6461 7279 2073 7461 636b secondary stack\n+00006c90: 206d 6179 2062 6520 7573 6564 2074 6f20 may be used to \n+00006ca0: 7374 6f72 6520 7468 6520 6461 7461 2061 store the data a\n+00006cb0: 6e64 206d 6179 2072 6573 756c 7420 696e nd may result in\n+00006cc0: 0a20 2020 2020 7374 6163 6b20 7374 6f72 . stack stor\n+00006cd0: 6167 6520 6578 6861 7573 7469 6f6e 2e0a age exhaustion..\n+00006ce0: 0a45 5843 4550 5449 4f4e 530a 2020 2020 .EXCEPTIONS. \n+00006cf0: 20e2 8098 436f 6e6e 6563 7469 6f6e 5f43 ...Connection_C\n+00006d00: 6c6f 7365 64e2 8099 5065 6572 2068 6173 losed...Peer has\n+00006d10: 2063 6c6f 7365 6420 7468 6520 636f 6e6e closed the conn\n+00006d20: 6563 7469 6f6e 2062 6566 6f72 650a 2020 ection before. \n+00006d30: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00006d40: 2020 2020 2020 7365 6e64 696e 6720 616e sending an\n+00006d50: 7920 6461 7461 0a0a 5345 4520 414c 534f y data..SEE ALSO\n+00006d60: 0a20 2020 2020 2a6e 6f74 6520 5265 6365 . *note Rece\n+00006d70: 6976 6520 2870 726f 6365 6475 7265 293a ive (procedure):\n+00006d80: 3a2c 0a20 2020 2020 2a6e 6f74 6520 5265 :,. *note Re\n+00006d90: 6365 6976 655f 536f 6d65 2028 7072 6f63 ceive_Some (proc\n+00006da0: 6564 7572 6529 3a3a 2c0a 2020 2020 202a edure)::,. *\n+00006db0: 6e6f 7465 2047 6574 5f4c 696e 6520 2866 note Get_Line (f\n+00006dc0: 756e 6374 696f 6e29 3a3a 2c0a 2020 2020 unction)::,. \n+00006dd0: 202a 6e6f 7465 2047 6574 5f4c 696e 6520 *note Get_Line \n+00006de0: 2870 726f 6365 6475 7265 293a 3a2e 0a0a (procedure)::...\n+00006df0: 1f0a 4669 6c65 3a20 6164 6173 6f63 6b65 ..File: adasocke\n+00006e00: 7473 2e69 6e66 6f2c 2020 4e6f 6465 3a20 ts.info, Node: \n+00006e10: 5265 6365 6976 6520 2870 726f 6365 6475 Receive (procedu\n+00006e20: 7265 292c 2020 4e65 7874 3a20 5265 6365 re), Next: Rece\n+00006e30: 6976 655f 536f 6d65 2028 7072 6f63 6564 ive_Some (proced\n+00006e40: 7572 6529 2c20 2050 7265 763a 2052 6563 ure), Prev: Rec\n+00006e50: 6569 7665 2028 6675 6e63 7469 6f6e 292c eive (function),\n+00006e60: 2020 5570 3a20 4163 6365 7074 5f53 6f63 Up: Accept_Soc\n+00006e70: 6b65 7420 2870 726f 6365 6475 7265 290a ket (procedure).\n+00006e80: 0a52 6563 6569 7665 2028 7072 6f63 6564 .Receive (proced\n+00006e90: 7572 6529 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d ure).-----------\n+00006ea0: 2d2d 2d2d 2d2d 2d2d 0a0a 5055 5250 4f53 --------..PURPOS\n+00006eb0: 450a 2020 2020 2052 6563 6569 7665 2072 E. Receive r\n+00006ec0: 6177 2064 6174 6120 6f76 6572 2061 2073 aw data over a s\n+00006ed0: 6f63 6b65 740a 5052 4f54 4f54 5950 450a ocket.PROTOTYPE.\n+00006ee0: 2020 2020 2020 2d2d 2053 6f63 6b65 7473 -- Sockets\n+00006ef0: 2e52 6563 6569 7665 3a20 7072 6f63 6564 .Receive: proced\n+00006f00: 7572 6520 5265 6365 6976 6520 2853 4f43 ure Receive (SOC\n+00006f10: 4b45 5420 3a20 536f 636b 6574 5f46 4427 KET : Socket_FD'\n+00006f20: 436c 6173 733b 0a20 2020 2020 2020 2020 Class;. \n+00006f30: 2020 2020 2020 4441 5441 203a 206f 7574 DATA : out\n+00006f40: 2041 6461 2e53 7472 6561 6d73 2e53 7472 Ada.Streams.Str\n+00006f50: 6561 6d5f 456c 656d 656e 745f 4172 7261 eam_Element_Arra\n+00006f60: 7929 3b0a 0a50 4152 414d 4554 4552 530a y);..PARAMETERS.\n+00006f70: 2020 2020 2053 4f43 4b45 5420 2020 2020 SOCKET \n+00006f80: 696e 2020 2020 2020 2020 2049 6e69 7469 in Initi\n+00006f90: 616c 697a 6564 2061 6e64 2062 6f75 6e64 alized and bound\n+00006fa0: 206f 7220 636f 6e6e 6563 7465 640a 2020 or connected. \n+00006fb0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00006fc0: 2020 2020 2020 2020 2073 6f63 6b65 7420 socket \n+00006fd0: 6f62 6a65 6374 0a20 2020 2020 4441 5441 object. DATA\n+00006fe0: 2020 2020 2020 206f 7574 2020 2020 2020 out \n+00006ff0: 2020 496e 636f 6d69 6e67 2064 6174 6120 Incoming data \n+00007000: 6275 6666 6572 0a0a 4445 5343 5249 5054 buffer..DESCRIPT\n+00007010: 494f 4e0a 2020 2020 2054 6869 7320 7072 ION. This pr\n+00007020: 6f63 6564 7572 6520 7265 6365 6976 6573 ocedure receives\n+00007030: 2064 6174 6120 6672 6f6d 2061 2062 6f75 data from a bou\n+00007040: 6e64 2055 4450 2073 6f63 6b65 7420 6f72 nd UDP socket or\n+00007050: 2061 2063 6f6e 6e65 6374 6564 0a20 2020 a connected. \n+00007060: 2020 5443 5020 736f 636b 6574 2e20 2049 TCP socket. I\n+00007070: 7420 7769 6c6c 2062 6c6f 636b 2075 6e74 t will block unt\n+00007080: 696c 2074 6865 2044 4154 4120 7265 6365 il the DATA rece\n+00007090: 7074 696f 6e20 6275 6666 6572 2068 6173 ption buffer has\n+000070a0: 2062 6565 6e0a 2020 2020 2074 6f74 616c been. total\n+000070b0: 6c79 2066 696c 6c65 642e 0a0a 4558 4345 ly filled...EXCE\n+000070c0: 5054 494f 4e53 0a20 2020 2020 e280 9843 PTIONS. ...C\n+000070d0: 6f6e 6e65 6374 696f 6e5f 436c 6f73 6564 onnection_Closed\n+000070e0: e280 9950 6565 7220 6861 7320 636c 6f73 ...Peer has clos\n+000070f0: 6564 2074 6865 2063 6f6e 6e65 6374 696f ed the connectio\n+00007100: 6e20 6265 666f 7265 0a20 2020 2020 2020 n before. \n+00007110: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00007120: 20e2 8098 4461 7461 274c 656e 6774 68e2 ...Data'Length.\n+00007130: 8099 2062 7974 6573 0a20 2020 2020 2020 .. bytes. \n+00007140: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00007150: 2077 6572 6520 7265 6365 6976 6564 0a0a were received..\n+00007160: 5345 4520 414c 534f 0a20 2020 2020 2a6e SEE ALSO. *n\n+00007170: 6f74 6520 4765 745f 4c69 6e65 2028 6675 ote Get_Line (fu\n+00007180: 6e63 7469 6f6e 293a 3a2c 0a20 2020 2020 nction)::,. \n+00007190: 2a6e 6f74 6520 4765 745f 4c69 6e65 2028 *note Get_Line (\n+000071a0: 7072 6f63 6564 7572 6529 3a3a 2c0a 2020 procedure)::,. \n+000071b0: 2020 202a 6e6f 7465 2052 6563 6569 7665 *note Receive\n+000071c0: 2028 6675 6e63 7469 6f6e 293a 3a2c 0a20 (function)::,. \n+000071d0: 2020 2020 2a6e 6f74 6520 5265 6365 6976 *note Receiv\n+000071e0: 655f 536f 6d65 2028 7072 6f63 6564 7572 e_Some (procedur\n+000071f0: 6529 3a3a 2e0a 0a1f 0a46 696c 653a 2061 e)::.....File: a\n+00007200: 6461 736f 636b 6574 732e 696e 666f 2c20 dasockets.info, \n+00007210: 204e 6f64 653a 2052 6563 6569 7665 5f53 Node: Receive_S\n+00007220: 6f6d 6520 2870 726f 6365 6475 7265 292c ome (procedure),\n+00007230: 2020 4e65 7874 3a20 5365 6e64 2028 7072 Next: Send (pr\n+00007240: 6f63 6564 7572 6529 2c20 2050 7265 763a ocedure), Prev:\n+00007250: 2052 6563 6569 7665 2028 7072 6f63 6564 Receive (proced\n+00007260: 7572 6529 2c20 2055 703a 2041 6363 6570 ure), Up: Accep\n+00007270: 745f 536f 636b 6574 2028 7072 6f63 6564 t_Socket (proced\n+00007280: 7572 6529 0a0a 5265 6365 6976 655f 536f ure)..Receive_So\n+00007290: 6d65 2028 7072 6f63 6564 7572 6529 0a2d me (procedure).-\n+000072a0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n+000072b0: 2d2d 2d2d 2d2d 2d0a 0a50 5552 504f 5345 -------..PURPOSE\n+000072c0: 0a20 2020 2020 5265 6365 6976 6520 7261 . Receive ra\n+000072d0: 7720 6461 7461 206f 7665 7220 6120 736f w data over a so\n+000072e0: 636b 6574 0a50 524f 544f 5459 5045 0a20 cket.PROTOTYPE. \n+000072f0: 2020 2020 202d 2d20 536f 636b 6574 732e -- Sockets.\n+00007300: 5265 6365 6976 655f 536f 6d65 3a20 7072 Receive_Some: pr\n+00007310: 6f63 6564 7572 6520 5265 6365 6976 655f ocedure Receive_\n+00007320: 536f 6d65 0a20 2020 2020 2020 2020 2020 Some. \n+00007330: 2020 2020 2853 4f43 4b45 5420 3a20 536f (SOCKET : So\n+00007340: 636b 6574 5f46 4427 436c 6173 733b 0a20 cket_FD'Class;. \n+00007350: 2020 2020 2020 2020 2020 2020 2020 4441 DA\n+00007360: 5441 203a 206f 7574 2041 6461 2e53 7472 TA : out Ada.Str\n+00007370: 6561 6d73 2e53 7472 6561 6d5f 456c 656d eams.Stream_Elem\n+00007380: 656e 745f 4172 7261 793b 0a20 2020 2020 ent_Array;. \n+00007390: 2020 2020 2020 2020 2020 4c41 5354 203a LAST :\n+000073a0: 206f 7574 2041 6461 2e53 7472 6561 6d73 out Ada.Streams\n+000073b0: 2e53 7472 6561 6d5f 456c 656d 656e 745f .Stream_Element_\n+000073c0: 4f66 6673 6574 293b 0a0a 5041 5241 4d45 Offset);..PARAME\n+000073d0: 5445 5253 0a20 2020 2020 534f 434b 4554 TERS. SOCKET\n+000073e0: 2020 2020 2069 6e20 2020 2020 2020 2020 in \n+000073f0: 496e 6974 6961 6c69 7a65 6420 616e 6420 Initialized and \n+00007400: 626f 756e 6420 6f72 2063 6f6e 6e65 6374 bound or connect\n+00007410: 6564 0a20 2020 2020 2020 2020 2020 2020 ed. \n+00007420: 2020 2020 2020 2020 2020 2020 2020 736f so\n+00007430: 636b 6574 206f 626a 6563 740a 2020 2020 cket object. \n+00007440: 2044 4154 4120 2020 2020 2020 6f75 7420 DATA out \n+00007450: 2020 2020 2020 2049 6e63 6f6d 696e 6720 Incoming \n+00007460: 6461 7461 2062 7566 6665 720a 2020 2020 data buffer. \n+00007470: 204c 4153 5420 2020 2020 2020 6f75 7420 LAST out \n+00007480: 2020 2020 2020 2049 6e64 6578 206f 6620 Index of \n+00007490: 6c61 7374 2065 6c65 6d65 6e74 2070 6c61 last element pla\n+000074a0: 6365 6420 696e 746f 2044 4154 410a 0a44 ced into DATA..D\n+000074b0: 4553 4352 4950 5449 4f4e 0a20 2020 2020 ESCRIPTION. \n+000074c0: 5468 6973 2070 726f 6365 6475 7265 2072 This procedure r\n+000074d0: 6563 6569 7665 7320 6461 7461 2066 726f eceives data fro\n+000074e0: 6d20 6120 626f 756e 6420 5544 5020 736f m a bound UDP so\n+000074f0: 636b 6574 206f 7220 6120 636f 6e6e 6563 cket or a connec\n+00007500: 7465 640a 2020 2020 2054 4350 2073 6f63 ted. TCP soc\n+00007510: 6b65 742e 2020 4173 2073 6f6f 6e20 6173 ket. As soon as\n+00007520: 2061 7420 6c65 6173 7420 6f6e 6520 6279 at least one by\n+00007530: 7465 2068 6173 2062 6565 6e20 7265 6164 te has been read\n+00007540: 2c20 6974 2072 6574 7572 6e73 0a20 2020 , it returns. \n+00007550: 2020 7769 7468 204c 4153 5420 7365 7420 with LAST set \n+00007560: 746f 2074 6865 2069 6e64 6578 206f 6620 to the index of \n+00007570: 7468 6520 6c61 7465 7374 2077 7269 7474 the latest writt\n+00007580: 656e 2065 6c65 6d65 6e74 206f 6620 4441 en element of DA\n+00007590: 5441 2e0a 0a45 5843 4550 5449 4f4e 530a TA...EXCEPTIONS.\n+000075a0: 2020 2020 20e2 8098 436f 6e6e 6563 7469 ...Connecti\n+000075b0: 6f6e 5f43 6c6f 7365 64e2 8099 5065 6572 on_Closed...Peer\n+000075c0: 2068 6173 2063 6c6f 7365 6420 7468 6520 has closed the \n+000075d0: 636f 6e6e 6563 7469 6f6e 2062 6566 6f72 connection befor\n+000075e0: 650a 2020 2020 2020 2020 2020 2020 2020 e. \n+000075f0: 2020 2020 2020 2020 2020 7365 6e64 696e sendin\n+00007600: 6720 616e 7920 6461 7461 0a0a 5345 4520 g any data..SEE \n+00007610: 414c 534f 0a20 2020 2020 2a6e 6f74 6520 ALSO. *note \n+00007620: 4765 745f 4c69 6e65 2028 6675 6e63 7469 Get_Line (functi\n+00007630: 6f6e 293a 3a2c 0a20 2020 2020 2a6e 6f74 on)::,. *not\n+00007640: 6520 4765 745f 4c69 6e65 2028 7072 6f63 e Get_Line (proc\n+00007650: 6564 7572 6529 3a3a 2c0a 2020 2020 202a edure)::,. *\n+00007660: 6e6f 7465 2052 6563 6569 7665 2028 6675 note Receive (fu\n+00007670: 6e63 7469 6f6e 293a 3a2c 0a20 2020 2020 nction)::,. \n+00007680: 2a6e 6f74 6520 5265 6365 6976 6520 2870 *note Receive (p\n+00007690: 726f 6365 6475 7265 293a 3a2e 0a0a 1f0a rocedure)::.....\n+000076a0: 4669 6c65 3a20 6164 6173 6f63 6b65 7473 File: adasockets\n+000076b0: 2e69 6e66 6f2c 2020 4e6f 6465 3a20 5365 .info, Node: Se\n+000076c0: 6e64 2028 7072 6f63 6564 7572 6529 2c20 nd (procedure), \n+000076d0: 204e 6578 743a 2053 6574 5f42 7566 6665 Next: Set_Buffe\n+000076e0: 7220 2870 726f 6365 6475 7265 292c 2020 r (procedure), \n+000076f0: 5072 6576 3a20 5265 6365 6976 655f 536f Prev: Receive_So\n+00007700: 6d65 2028 7072 6f63 6564 7572 6529 2c20 me (procedure), \n+00007710: 2055 703a 2041 6363 6570 745f 536f 636b Up: Accept_Sock\n+00007720: 6574 2028 7072 6f63 6564 7572 6529 0a0a et (procedure)..\n+00007730: 5365 6e64 2028 7072 6f63 6564 7572 6529 Send (procedure)\n+00007740: 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d .---------------\n+00007750: 2d0a 0a50 5552 504f 5345 0a20 2020 2020 -..PURPOSE. \n+00007760: 5365 6e64 2072 6177 2064 6174 6120 6f76 Send raw data ov\n+00007770: 6572 2061 2073 6f63 6b65 740a 5052 4f54 er a socket.PROT\n+00007780: 4f54 5950 450a 2020 2020 2020 2d2d 2053 OTYPE. -- S\n+00007790: 6f63 6b65 7473 2e53 656e 643a 2070 726f ockets.Send: pro\n+000077a0: 6365 6475 7265 2053 656e 6420 2853 4f43 cedure Send (SOC\n+000077b0: 4b45 5420 3a20 536f 636b 6574 5f46 443b KET : Socket_FD;\n+000077c0: 0a20 2020 2020 2020 2020 2020 2020 2020 . \n+000077d0: 4441 5441 203a 206f 7574 2041 6461 2e53 DATA : out Ada.S\n+000077e0: 7472 6561 6d73 2e53 7472 6561 6d5f 456c treams.Stream_El\n+000077f0: 656d 656e 745f 4172 7261 7929 3b0a 0a50 ement_Array);..P\n+00007800: 4152 414d 4554 4552 530a 2020 2020 2053 ARAMETERS. S\n+00007810: 4f43 4b45 5420 2020 2020 696e 2020 2020 OCKET in \n+00007820: 2020 2020 2049 6e69 7469 616c 697a 6564 Initialized\n+00007830: 2061 6e64 2063 6f6e 6e65 6374 6564 2073 and connected s\n+00007840: 6f63 6b65 7420 6f62 6a65 6374 0a20 2020 ocket object. \n+00007850: 2020 4441 5441 2020 2020 2020 206f 7574 DATA out\n+00007860: 2020 2020 2020 2020 4461 7461 2074 6f20 Data to \n+00007870: 6265 2073 656e 740a 0a44 4553 4352 4950 be sent..DESCRIP\n+00007880: 5449 4f4e 0a20 2020 2020 5468 6973 2070 TION. This p\n+00007890: 726f 6365 6475 7265 2073 656e 6473 2064 rocedure sends d\n+000078a0: 6174 6120 6f76 6572 2061 2063 6f6e 6e65 ata over a conne\n+000078b0: 6374 6564 206f 7574 676f 696e 6720 736f cted outgoing so\n+000078c0: 636b 6574 206f 7220 6f76 6572 0a20 2020 cket or over. \n+000078d0: 2020 616e 2069 6e63 6f6d 696e 6720 736f an incoming so\n+000078e0: 636b 6574 2e0a 0a45 5843 4550 5449 4f4e cket...EXCEPTION\n+000078f0: 530a 2020 2020 20e2 8098 436f 6e6e 6563 S. ...Connec\n+00007900: 7469 6f6e 5f43 6c6f 7365 64e2 8099 5065 tion_Closed...Pe\n+00007910: 6572 2068 6173 2070 7265 6d61 7475 7265 er has premature\n+00007920: 6c79 2063 6c6f 7365 6420 7468 6520 636f ly closed the co\n+00007930: 6e6e 6563 7469 6f6e 0a0a 5345 4520 414c nnection..SEE AL\n+00007940: 534f 0a20 2020 2020 2a6e 6f74 6520 5075 SO. *note Pu\n+00007950: 7420 2870 726f 6365 6475 7265 293a 3a2c t (procedure)::,\n+00007960: 0a20 2020 2020 2a6e 6f74 6520 5075 745f . *note Put_\n+00007970: 4c69 6e65 2028 7072 6f63 6564 7572 6529 Line (procedure)\n+00007980: 3a3a 2e0a 0a1f 0a46 696c 653a 2061 6461 ::.....File: ada\n+00007990: 736f 636b 6574 732e 696e 666f 2c20 204e sockets.info, N\n+000079a0: 6f64 653a 2053 6574 5f42 7566 6665 7220 ode: Set_Buffer \n+000079b0: 2870 726f 6365 6475 7265 292c 2020 4e65 (procedure), Ne\n+000079c0: 7874 3a20 5365 7473 6f63 6b6f 7074 2028 xt: Setsockopt (\n+000079d0: 7072 6f63 6564 7572 6529 2c20 2050 7265 procedure), Pre\n+000079e0: 763a 2053 656e 6420 2870 726f 6365 6475 v: Send (procedu\n+000079f0: 7265 292c 2020 5570 3a20 4163 6365 7074 re), Up: Accept\n+00007a00: 5f53 6f63 6b65 7420 2870 726f 6365 6475 _Socket (procedu\n+00007a10: 7265 290a 0a53 6574 5f42 7566 6665 7220 re)..Set_Buffer \n+00007a20: 2870 726f 6365 6475 7265 290a 2d2d 2d2d (procedure).----\n+00007a30: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n+00007a40: 2d2d 0a0a 5055 5250 4f53 450a 2020 2020 --..PURPOSE. \n+00007a50: 2049 6e73 7461 6c6c 2061 206c 696e 652d Install a line-\n+00007a60: 6f72 6965 6e74 6564 2062 7566 6665 7220 oriented buffer \n+00007a70: 6f66 2074 6865 2073 6f63 6b65 7420 6f62 of the socket ob\n+00007a80: 6a65 6374 0a50 524f 544f 5459 5045 0a20 ject.PROTOTYPE. \n+00007a90: 2020 2020 202d 2d20 536f 636b 6574 732e -- Sockets.\n+00007aa0: 5365 745f 4275 6666 6572 3a20 7072 6f63 Set_Buffer: proc\n+00007ab0: 6564 7572 6520 5365 745f 4275 6666 6572 edure Set_Buffer\n+00007ac0: 0a20 2020 2020 2020 2020 2020 2020 2020 . \n+00007ad0: 2853 4f43 4b45 5420 3a20 536f 636b 6574 (SOCKET : Socket\n+00007ae0: 5f46 4427 436c 6173 733b 204c 454e 4754 _FD'Class; LENGT\n+00007af0: 4820 3a20 506f 7369 7469 7665 203a 3d20 H : Positive := \n+00007b00: 3135 3030 293b 0a0a 5041 5241 4d45 5445 1500);..PARAMETE\n+00007b10: 5253 0a20 2020 2020 534f 434b 4554 2020 RS. SOCKET \n+00007b20: 2020 2069 6e20 2020 2020 2020 2020 496e in In\n+00007b30: 6974 6961 6c69 7a65 6420 616e 6420 636f itialized and co\n+00007b40: 6e6e 6563 7465 6420 736f 636b 6574 206f nnected socket o\n+00007b50: 626a 6563 740a 2020 2020 204c 454e 4754 bject. LENGT\n+00007b60: 4820 2020 2020 696e 2020 2020 2020 2020 H in \n+00007b70: 2053 697a 6520 696e 2062 7974 6573 206f Size in bytes o\n+00007b80: 6620 7468 6520 6e65 776c 7920 696e 7374 f the newly inst\n+00007b90: 616c 6c65 640a 2020 2020 2020 2020 2020 alled. \n+00007ba0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00007bb0: 2062 7566 6665 720a 0a44 4553 4352 4950 buffer..DESCRIP\n+00007bc0: 5449 4f4e 0a20 2020 2020 5468 6973 2070 TION. This p\n+00007bd0: 726f 6365 6475 7265 2070 7574 7320 7468 rocedure puts th\n+00007be0: 6520 736f 636b 6574 206f 626a 6563 7420 e socket object \n+00007bf0: 696e 2062 7566 6665 7265 6420 6d6f 6465 in buffered mode\n+00007c00: 2e20 2049 6620 7468 650a 2020 2020 2073 . If the. s\n+00007c10: 6f63 6b65 7420 7761 7320 616c 7265 6164 ocket was alread\n+00007c20: 7920 6275 6666 6572 6564 2c20 7468 6520 y buffered, the \n+00007c30: 636f 6e74 656e 7420 6f66 2074 6865 2070 content of the p\n+00007c40: 7265 7669 6f75 7320 6275 6666 6572 0a20 revious buffer. \n+00007c50: 2020 2020 7769 6c6c 2062 6520 6c6f 7374 will be lost\n+00007c60: 2e20 2054 6865 2062 7566 6665 7265 6420 . The buffered \n+00007c70: 6d6f 6465 206f 6e6c 7920 6166 6665 6374 mode only affect\n+00007c80: 7320 6368 6172 6163 7465 722d 2061 6e64 s character- and\n+00007c90: 0a20 2020 2020 6c69 6e65 2d6f 7269 656e . line-orien\n+00007ca0: 7465 6420 7265 6164 206f 7065 7261 7469 ted read operati\n+00007cb0: 6f6e 2073 7563 6820 6173 202a 6e6f 7465 on such as *note\n+00007cc0: 2047 6574 2028 6675 6e63 7469 6f6e 293a Get (function):\n+00007cd0: 3a2c 202a 6e6f 7465 0a20 2020 2020 4765 :, *note. Ge\n+00007ce0: 745f 4368 6172 2028 6675 6e63 7469 6f6e t_Char (function\n+00007cf0: 293a 3a2c 2061 6e64 202a 6e6f 7465 2047 )::, and *note G\n+00007d00: 6574 5f4c 696e 6520 2866 756e 6374 696f et_Line (functio\n+00007d10: 6e29 3a3a 2e20 204f 7468 6572 0a20 2020 n)::. Other. \n+00007d20: 2020 7265 6365 7074 696f 6e20 7375 6270 reception subp\n+00007d30: 726f 6772 616d 7320 7769 6c6c 206e 6f74 rograms will not\n+00007d40: 2066 756e 6374 696f 6e20 7072 6f70 6572 function proper\n+00007d50: 6c79 2069 6620 6275 6666 6572 6564 206d ly if buffered m\n+00007d60: 6f64 650a 2020 2020 2069 7320 7573 6564 ode. is used\n+00007d70: 2061 7420 7468 6520 7361 6d65 2074 696d at the same tim\n+00007d80: 652e 0a0a 2020 2020 2054 6865 2073 697a e... The siz\n+00007d90: 6520 6f66 2074 6865 2062 7566 6665 7220 e of the buffer \n+00007da0: 6861 7320 746f 2062 6520 6772 6561 7465 has to be greate\n+00007db0: 7220 7468 616e 2074 6865 2062 6967 6765 r than the bigge\n+00007dc0: 7374 2070 6f73 7369 626c 650a 2020 2020 st possible. \n+00007dd0: 2070 6163 6b65 7420 7365 6e74 2062 7920 packet sent by \n+00007de0: 7468 6520 7265 6d6f 7465 2068 6f73 742c the remote host,\n+00007df0: 206f 7468 6572 7769 7365 2064 6174 6120 otherwise data \n+00007e00: 6c6f 7373 206d 6179 206f 6363 7572 2e0a loss may occur..\n+00007e10: 0a53 4545 2041 4c53 4f0a 2020 2020 202a .SEE ALSO. *\n+00007e20: 6e6f 7465 2055 6e73 6574 5f42 7566 6665 note Unset_Buffe\n+00007e30: 7220 2870 726f 6365 6475 7265 293a 3a2e r (procedure)::.\n+00007e40: 0a0a 1f0a 4669 6c65 3a20 6164 6173 6f63 ....File: adasoc\n+00007e50: 6b65 7473 2e69 6e66 6f2c 2020 4e6f 6465 kets.info, Node\n+00007e60: 3a20 5365 7473 6f63 6b6f 7074 2028 7072 : Setsockopt (pr\n+00007e70: 6f63 6564 7572 6529 2c20 204e 6578 743a ocedure), Next:\n+00007e80: 2053 6875 7464 6f77 6e20 2870 726f 6365 Shutdown (proce\n+00007e90: 6475 7265 292c 2020 5072 6576 3a20 5365 dure), Prev: Se\n+00007ea0: 745f 4275 6666 6572 2028 7072 6f63 6564 t_Buffer (proced\n+00007eb0: 7572 6529 2c20 2055 703a 2041 6363 6570 ure), Up: Accep\n+00007ec0: 745f 536f 636b 6574 2028 7072 6f63 6564 t_Socket (proced\n+00007ed0: 7572 6529 0a0a 5365 7473 6f63 6b6f 7074 ure)..Setsockopt\n+00007ee0: 2028 7072 6f63 6564 7572 6529 0a2d 2d2d (procedure).---\n+00007ef0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n+00007f00: 2d2d 2d0a 0a50 5552 504f 5345 0a20 2020 ---..PURPOSE. \n+00007f10: 2020 5365 7420 6120 736f 636b 6574 206f Set a socket o\n+00007f20: 7074 696f 6e0a 5052 4f54 4f54 5950 450a ption.PROTOTYPE.\n+00007f30: 2020 2020 2020 2d2d 2053 6f63 6b65 7473 -- Sockets\n+00007f40: 2e53 6574 736f 636b 6f70 743a 2070 726f .Setsockopt: pro\n+00007f50: 6365 6475 7265 2053 6574 736f 636b 6f70 cedure Setsockop\n+00007f60: 7420 2853 4f43 4b45 5420 3a20 536f 636b t (SOCKET : Sock\n+00007f70: 6574 5f46 443b 0a20 2020 2020 2020 2020 et_FD;. \n+00007f80: 2020 2020 2020 4c45 5645 4c20 3a20 536f LEVEL : So\n+00007f90: 636b 6574 5f4c 6576 656c 203a 3d20 534f cket_Level := SO\n+00007fa0: 4c5f 534f 434b 4554 3b0a 2020 2020 2020 L_SOCKET;. \n+00007fb0: 2020 2020 2020 2020 204f 5054 4e41 4d45 OPTNAME\n+00007fc0: 203a 2053 6f63 6b65 745f 4f70 7469 6f6e : Socket_Option\n+00007fd0: 3b20 4f50 5456 414c 203a 2049 6e74 6567 ; OPTVAL : Integ\n+00007fe0: 6572 293b 0a0a 5041 5241 4d45 5445 5253 er);..PARAMETERS\n+00007ff0: 0a20 2020 2020 534f 434b 4554 2020 2020 . SOCKET \n+00008000: 2069 6e20 2020 2020 2020 2020 496e 6974 in Init\n+00008010: 6961 6c69 7a65 6420 616e 6420 626f 756e ialized and boun\n+00008020: 6420 736f 636b 6574 206f 626a 6563 740a d socket object.\n+00008030: 2020 2020 204c 4556 454c 2020 2020 2020 LEVEL \n+00008040: 696e 2020 2020 2020 2020 2050 726f 746f in Proto\n+00008050: 636f 6c20 6c65 7665 6c0a 2020 2020 204f col level. O\n+00008060: 5054 4e41 4d45 2020 2020 696e 2020 2020 PTNAME in \n+00008070: 2020 2020 204f 7074 696f 6e20 6e61 6d65 Option name\n+00008080: 0a20 2020 2020 4f50 5456 414c 2020 2020 . OPTVAL \n+00008090: 2069 6e20 2020 2020 2020 2020 4f70 7469 in Opti\n+000080a0: 6f6e 2076 616c 7565 0a0a 4445 5343 5249 on value..DESCRI\n+000080b0: 5054 494f 4e0a 2020 2020 2054 6869 7320 PTION. This \n+000080c0: 7072 6f63 6564 7572 6520 7365 7473 206f procedure sets o\n+000080d0: 7074 696f 6e73 2061 7070 6c69 6361 626c ptions applicabl\n+000080e0: 6520 746f 2061 2073 6f63 6b65 742e 2020 e to a socket. \n+000080f0: 506c 6561 7365 2073 6565 0a20 2020 2020 Please see. \n+00008100: 796f 7572 206f 7065 7261 7469 6e67 2073 your operating s\n+00008110: 7973 7465 6d20 6d61 6e75 616c 2066 6f72 ystem manual for\n+00008120: 2075 7361 626c 6520 6c65 7665 6c73 2061 usable levels a\n+00008130: 6e64 206f 7074 696f 6e73 2e0a 0a20 2020 nd options... \n+00008140: 2020 5477 6f20 6c65 7665 6c73 2061 7265 Two levels are\n+00008150: 2064 6566 696e 6564 3a20 e280 9853 4f4c defined: ...SOL\n+00008160: 5f53 4f43 4b45 54e2 8099 2028 7468 6520 _SOCKET... (the \n+00008170: 6465 6661 756c 7429 2061 6e64 0a20 2020 default) and. \n+00008180: 2020 e280 9849 5050 524f 544f 5f49 50e2 ...IPPROTO_IP.\n+00008190: 8099 2e20 2054 6865 206f 7074 696f 6e73 ... The options\n+000081a0: 2061 7265 20e2 8098 534f 5f52 4555 5345 are ...SO_REUSE\n+000081b0: 4144 4452 e280 992c 20e2 8098 534f 5f52 ADDR..., ...SO_R\n+000081c0: 4555 5345 504f 5254 e280 992c 0a20 2020 EUSEPORT...,. \n+000081d0: 2020 e280 9849 505f 4d55 4c54 4943 4153 ...IP_MULTICAS\n+000081e0: 545f 5454 4ce2 8099 2c20 e280 9849 505f T_TTL..., ...IP_\n+000081f0: 4144 445f 4d45 4d42 4552 5348 4950 e280 ADD_MEMBERSHIP..\n+00008200: 992c 20e2 8098 4950 5f44 524f 505f 4d45 ., ...IP_DROP_ME\n+00008210: 4d42 4552 5348 4950 e280 992c 0a20 2020 MBERSHIP...,. \n+00008220: 2020 e280 9849 505f 4d55 4c54 4943 4153 ...IP_MULTICAS\n+00008230: 545f 4c4f 4f50 e280 992c 20e2 8098 534f T_LOOP..., ...SO\n+00008240: 5f53 4e44 4255 46e2 8099 2061 6e64 20e2 _SNDBUF... and .\n+00008250: 8098 4950 5f52 4356 4255 46e2 8099 2e0a ..IP_RCVBUF.....\n+00008260: 0a20 2020 2020 4e6f 7465 2074 6861 7420 . Note that \n+00008270: 756e 6c69 6b65 2074 6865 6972 2043 206c unlike their C l\n+00008280: 616e 6775 6167 6520 636f 756e 7465 7270 anguage counterp\n+00008290: 6172 742c 20e2 8098 4765 7473 6f63 6b6f art, ...Getsocko\n+000082a0: 7074 e280 9920 616e 640a 2020 2020 20e2 pt... and. .\n+000082b0: 8098 5365 7473 6f63 6b6f 7074 e280 9920 ..Setsockopt... \n+000082c0: 646f 206e 6f74 2072 6571 7569 7265 2061 do not require a\n+000082d0: 6e20 6578 7472 6120 7061 7261 6d65 7465 n extra paramete\n+000082e0: 7220 7265 7072 6573 656e 7469 6e67 2074 r representing t\n+000082f0: 6865 0a20 2020 2020 6c65 6e67 7468 2069 he. length i\n+00008300: 6e20 6279 7465 7320 6f66 2074 6865 206f n bytes of the o\n+00008310: 7074 696f 6e20 7661 6c75 652e 2020 4164 ption value. Ad\n+00008320: 6153 6f63 6b65 7473 206b 6e6f 7773 2074 aSockets knows t\n+00008330: 6865 2072 6967 6874 0a20 2020 2020 7369 he right. si\n+00008340: 7a65 2066 6f72 2065 7665 7279 206f 7074 ze for every opt\n+00008350: 696f 6e2e 0a0a 5345 4520 414c 534f 0a20 ion...SEE ALSO. \n+00008360: 2020 2020 2a6e 6f74 6520 4765 7473 6f63 *note Getsoc\n+00008370: 6b6f 7074 2028 7072 6f63 6564 7572 6529 kopt (procedure)\n+00008380: 3a3a 2e0a 0a1f 0a46 696c 653a 2061 6461 ::.....File: ada\n+00008390: 736f 636b 6574 732e 696e 666f 2c20 204e sockets.info, N\n+000083a0: 6f64 653a 2053 6875 7464 6f77 6e20 2870 ode: Shutdown (p\n+000083b0: 726f 6365 6475 7265 292c 2020 4e65 7874 rocedure), Next\n+000083c0: 3a20 536f 636b 6574 2028 7072 6f63 6564 : Socket (proced\n+000083d0: 7572 6529 2c20 2050 7265 763a 2053 6574 ure), Prev: Set\n+000083e0: 736f 636b 6f70 7420 2870 726f 6365 6475 sockopt (procedu\n+000083f0: 7265 292c 2020 5570 3a20 4163 6365 7074 re), Up: Accept\n+00008400: 5f53 6f63 6b65 7420 2870 726f 6365 6475 _Socket (procedu\n+00008410: 7265 290a 0a53 6875 7464 6f77 6e20 2870 re)..Shutdown (p\n+00008420: 726f 6365 6475 7265 290a 2d2d 2d2d 2d2d rocedure).------\n+00008430: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 0a0a --------------..\n+00008440: 5055 5250 4f53 450a 2020 2020 2053 6875 PURPOSE. Shu\n+00008450: 7464 6f77 6e20 6120 736f 636b 6574 0a50 tdown a socket.P\n+00008460: 524f 544f 5459 5045 0a20 2020 2020 202d ROTOTYPE. -\n+00008470: 2d20 536f 636b 6574 732e 5368 7574 646f - Sockets.Shutdo\n+00008480: 776e 3a20 7072 6f63 6564 7572 6520 5368 wn: procedure Sh\n+00008490: 7574 646f 776e 0a20 2020 2020 2020 2020 utdown. \n+000084a0: 2020 2020 2020 2853 4f43 4b45 5420 3a20 (SOCKET : \n+000084b0: 696e 206f 7574 2053 6f63 6b65 745f 4644 in out Socket_FD\n+000084c0: 3b20 484f 5720 3a20 5368 7574 646f 776e ; HOW : Shutdown\n+000084d0: 5f54 7970 6520 3a3d 2042 6f74 6829 3b0a _Type := Both);.\n+000084e0: 0a50 4152 414d 4554 4552 530a 2020 2020 .PARAMETERS. \n+000084f0: 2053 4f43 4b45 5420 2020 2020 696e 206f SOCKET in o\n+00008500: 7574 2020 2020 2053 6f63 6b65 7420 6f62 ut Socket ob\n+00008510: 6a65 6374 2074 6f20 7368 7574 646f 776e ject to shutdown\n+00008520: 0a20 2020 2020 484f 5720 2020 2020 2020 . HOW \n+00008530: 2069 6e20 2020 2020 2020 2020 4469 7265 in Dire\n+00008540: 6374 696f 6e20 746f 2073 6875 7464 6f77 ction to shutdow\n+00008550: 6e0a 0a44 4553 4352 4950 5449 4f4e 0a20 n..DESCRIPTION. \n+00008560: 2020 2020 5468 6973 2070 726f 6365 6475 This procedu\n+00008570: 7265 2073 6875 7464 6f77 6e73 2065 6974 re shutdowns eit\n+00008580: 6865 7220 6469 7265 6374 696f 6e20 6f66 her direction of\n+00008590: 2074 6865 2073 6f63 6b65 742e 2020 484f the socket. HO\n+000085a0: 5720 6361 6e0a 2020 2020 2074 616b 6520 W can. take \n+000085b0: 7468 6520 7661 6c75 6520 e280 9853 656e the value ...Sen\n+000085c0: 64e2 8099 2c20 e280 9852 6563 6569 7665 d..., ...Receive\n+000085d0: e280 9920 6f72 20e2 8098 426f 7468 e280 ... or ...Both..\n+000085e0: 992e 0a0a 5345 4520 414c 534f 0a20 2020 ....SEE ALSO. \n+000085f0: 2020 2a6e 6f74 6520 536f 636b 6574 2028 *note Socket (\n+00008600: 7072 6f63 6564 7572 6529 3a3a 2e0a 0a1f procedure)::....\n+00008610: 0a46 696c 653a 2061 6461 736f 636b 6574 .File: adasocket\n+00008620: 732e 696e 666f 2c20 204e 6f64 653a 2053 s.info, Node: S\n+00008630: 6f63 6b65 7420 2870 726f 6365 6475 7265 ocket (procedure\n+00008640: 292c 2020 4e65 7874 3a20 556e 7365 745f ), Next: Unset_\n+00008650: 4275 6666 6572 2028 7072 6f63 6564 7572 Buffer (procedur\n+00008660: 6529 2c20 2050 7265 763a 2053 6875 7464 e), Prev: Shutd\n+00008670: 6f77 6e20 2870 726f 6365 6475 7265 292c own (procedure),\n+00008680: 2020 5570 3a20 4163 6365 7074 5f53 6f63 Up: Accept_Soc\n+00008690: 6b65 7420 2870 726f 6365 6475 7265 290a ket (procedure).\n+000086a0: 0a53 6f63 6b65 7420 2870 726f 6365 6475 .Socket (procedu\n+000086b0: 7265 290a 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d re).------------\n+000086c0: 2d2d 2d2d 2d2d 0a0a 5055 5250 4f53 450a ------..PURPOSE.\n+000086d0: 2020 2020 2043 7265 6174 6520 6120 736f Create a so\n+000086e0: 636b 6574 206f 6620 7468 6520 6769 7665 cket of the give\n+000086f0: 6e20 6d6f 6465 0a50 524f 544f 5459 5045 n mode.PROTOTYPE\n+00008700: 0a20 2020 2020 202d 2d20 536f 636b 6574 . -- Socket\n+00008710: 732e 536f 636b 6574 3a20 7072 6f63 6564 s.Socket: proced\n+00008720: 7572 6520 536f 636b 6574 2028 534f 434b ure Socket (SOCK\n+00008730: 4554 203a 206f 7574 2053 6f63 6b65 745f ET : out Socket_\n+00008740: 4644 3b0a 2020 2020 2020 2020 2020 2020 FD;. \n+00008750: 2020 2044 4f4d 4149 4e20 3a20 536f 636b DOMAIN : Sock\n+00008760: 6574 5f44 6f6d 6169 6e20 3a3d 2050 465f et_Domain := PF_\n+00008770: 494e 4554 3b0a 2020 2020 2020 2020 2020 INET;. \n+00008780: 2020 2020 2054 5950 203a 2053 6f63 6b65 TYP : Socke\n+00008790: 745f 5479 7065 203a 3d20 534f 434b 5f53 t_Type := SOCK_S\n+000087a0: 5452 4541 4d29 3b0a 0a50 4152 414d 4554 TREAM);..PARAMET\n+000087b0: 4552 530a 2020 2020 2053 4f43 4b45 5420 ERS. SOCKET \n+000087c0: 2020 2020 6f75 7420 2020 2020 2020 2053 out S\n+000087d0: 6f63 6b65 7420 6f62 6a65 6374 2074 6f20 ocket object to \n+000087e0: 696e 6974 6961 6c69 7a65 0a20 2020 2020 initialize. \n+000087f0: 444f 4d41 494e 2020 2020 2069 6e20 2020 DOMAIN in \n+00008800: 2020 2020 2020 5072 6f74 6f63 6f6c 2066 Protocol f\n+00008810: 616d 696c 790a 2020 2020 2054 5950 2020 amily. TYP \n+00008820: 2020 2020 2020 696e 2020 2020 2020 2020 in \n+00008830: 204b 696e 6420 6f66 2073 6f63 6b65 7473 Kind of sockets\n+00008840: 0a0a 4445 5343 5249 5054 494f 4e0a 2020 ..DESCRIPTION. \n+00008850: 2020 2054 6869 7320 7072 6f63 6564 7572 This procedur\n+00008860: 6520 696e 6974 6961 6c69 7a65 7320 6120 e initializes a \n+00008870: 6e65 7720 736f 636b 6574 206f 626a 6563 new socket objec\n+00008880: 7420 6279 2072 6573 6572 7669 6e67 2061 t by reserving a\n+00008890: 2066 696c 650a 2020 2020 2064 6573 6372 file. descr\n+000088a0: 6970 746f 7220 746f 2074 6865 206f 7065 iptor to the ope\n+000088b0: 7261 7469 6e67 2073 7973 7465 6d2e 2020 rating system. \n+000088c0: 466f 7220 6261 636b 7761 7264 2063 6f6d For backward com\n+000088d0: 7061 7469 6269 6c69 7479 0a20 2020 2020 patibility. \n+000088e0: 7769 7468 206f 6c64 6572 2076 6572 7369 with older versi\n+000088f0: 6f6e 7320 6f66 2074 6869 7320 6c69 6272 ons of this libr\n+00008900: 6172 792c 20e2 8098 4146 5f49 4e45 54e2 ary, ...AF_INET.\n+00008910: 8099 2069 7320 7374 696c 6c20 6163 6365 .. is still acce\n+00008920: 7074 6564 2061 730a 2020 2020 2061 2076 pted as. a v\n+00008930: 616c 7565 2062 7574 2073 686f 756c 6420 alue but should \n+00008940: 6265 2072 6570 6c61 6365 6420 6173 2073 be replaced as s\n+00008950: 6f6f 6e20 6173 2070 6f73 7369 626c 6520 oon as possible \n+00008960: 7769 7468 2074 6865 2070 726f 7065 720a with the proper.\n+00008970: 2020 2020 20e2 8098 5046 5f49 4e45 54e2 ...PF_INET.\n+00008980: 8099 2e20 2055 7369 6e67 20e2 8098 534f ... Using ...SO\n+00008990: 434b 5f53 5452 4541 4de2 8099 2066 6f72 CK_STREAM... for\n+000089a0: 2074 6865 2054 5950 2061 7267 756d 656e the TYP argumen\n+000089b0: 7420 7769 6c6c 2063 7265 6174 6520 610a t will create a.\n+000089c0: 2020 2020 2054 4350 2073 6f63 6b65 7420 TCP socket \n+000089d0: 7768 696c 6520 6120 e280 9853 4f43 4b5f while a ...SOCK_\n+000089e0: 4447 5241 4de2 8099 2077 696c 6c20 6372 DGRAM... will cr\n+000089f0: 6561 7465 2061 2055 4450 206f 6e65 2e0a eate a UDP one..\n+00008a00: 0a45 5841 4d50 4c45 0a20 2020 2020 2020 .EXAMPLE. \n+00008a10: 2020 2064 6563 6c61 7265 0a20 2020 2020 declare. \n+00008a20: 2020 2020 2020 2020 536f 636b 203a 2053 Sock : S\n+00008a30: 6f63 6b65 745f 4644 3b0a 2020 2020 2020 ocket_FD;. \n+00008a40: 2020 2020 6265 6769 6e0a 2020 2020 2020 begin. \n+00008a50: 2020 2020 2020 202d 2d20 4372 6561 7465 -- Create\n+00008a60: 2061 2054 4350 2073 6f63 6b65 740a 2020 a TCP socket. \n+00008a70: 2020 2020 2020 2020 2020 2053 6f63 6b65 Socke\n+00008a80: 7420 2853 6f63 6b2c 2050 465f 494e 4554 t (Sock, PF_INET\n+00008a90: 2c20 534f 434b 5f53 5452 4541 4d29 3b0a , SOCK_STREAM);.\n+00008aa0: 2020 2020 2020 2020 2020 2020 202d 2d20 -- \n+00008ab0: 5065 7266 6f72 6d20 736f 6d65 206f 7065 Perform some ope\n+00008ac0: 7261 7469 6f6e 7320 6f6e 2073 6f63 6b65 rations on socke\n+00008ad0: 740a 2020 2020 2020 2020 2020 2020 205b t. [\n+00008ae0: 2e2e 2e5d 0a20 2020 2020 2020 2020 2020 ...]. \n+00008af0: 2020 2d2d 2053 6875 7464 6f77 6e20 7468 -- Shutdown th\n+00008b00: 6520 736f 636b 6574 2069 6e20 626f 7468 e socket in both\n+00008b10: 2064 6972 6563 7469 6f6e 730a 2020 2020 directions. \n+00008b20: 2020 2020 2020 2020 2053 6875 7464 6f77 Shutdow\n+00008b30: 6e20 2853 6f63 6b2c 2042 6f74 6829 3b0a n (Sock, Both);.\n+00008b40: 2020 2020 2020 2020 2020 656e 643b 0a0a end;..\n+00008b50: 5345 4520 414c 534f 0a20 2020 2020 2a6e SEE ALSO. *n\n+00008b60: 6f74 6520 5368 7574 646f 776e 2028 7072 ote Shutdown (pr\n+00008b70: 6f63 6564 7572 6529 3a3a 2e0a 0a1f 0a46 ocedure)::.....F\n+00008b80: 696c 653a 2061 6461 736f 636b 6574 732e ile: adasockets.\n+00008b90: 696e 666f 2c20 204e 6f64 653a 2055 6e73 info, Node: Uns\n+00008ba0: 6574 5f42 7566 6665 7220 2870 726f 6365 et_Buffer (proce\n+00008bb0: 6475 7265 292c 2020 5072 6576 3a20 536f dure), Prev: So\n+00008bc0: 636b 6574 2028 7072 6f63 6564 7572 6529 cket (procedure)\n+00008bd0: 2c20 2055 703a 2041 6363 6570 745f 536f , Up: Accept_So\n+00008be0: 636b 6574 2028 7072 6f63 6564 7572 6529 cket (procedure)\n+00008bf0: 0a0a 556e 7365 745f 4275 6666 6572 2028 ..Unset_Buffer (\n+00008c00: 7072 6f63 6564 7572 6529 0a2d 2d2d 2d2d procedure).-----\n+00008c10: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ----------------\n+00008c20: 2d2d 2d0a 0a50 5552 504f 5345 0a20 2020 ---..PURPOSE. \n+00008c30: 2020 4465 696e 7374 616c 6c20 7468 6520 Deinstall the \n+00008c40: 6c69 6e65 2d6f 7269 656e 7465 6420 6275 line-oriented bu\n+00008c50: 6666 6572 206f 6620 7468 6520 736f 636b ffer of the sock\n+00008c60: 6574 206f 626a 6563 740a 5052 4f54 4f54 et object.PROTOT\n+00008c70: 5950 450a 2020 2020 2020 2d2d 2053 6f63 YPE. -- Soc\n+00008c80: 6b65 7473 2e55 6e73 6574 5f42 7566 6665 kets.Unset_Buffe\n+00008c90: 723a 2070 726f 6365 6475 7265 2055 6e73 r: procedure Uns\n+00008ca0: 6574 5f42 7566 6665 720a 2020 2020 2020 et_Buffer. \n+00008cb0: 2020 2020 2020 2020 2028 534f 434b 4554 (SOCKET\n+00008cc0: 203a 2053 6f63 6b65 745f 4644 2743 6c61 : Socket_FD'Cla\n+00008cd0: 7373 293b 0a0a 5041 5241 4d45 5445 5253 ss);..PARAMETERS\n+00008ce0: 0a20 2020 2020 534f 434b 4554 2020 2020 . SOCKET \n+00008cf0: 2069 6e20 2020 2020 2020 2020 496e 6974 in Init\n+00008d00: 6961 6c69 7a65 6420 616e 6420 636f 6e6e ialized and conn\n+00008d10: 6563 7465 6420 736f 636b 6574 206f 626a ected socket obj\n+00008d20: 6563 740a 0a44 4553 4352 4950 5449 4f4e ect..DESCRIPTION\n+00008d30: 0a20 2020 2020 5468 6973 2070 726f 6365 . This proce\n+00008d40: 6475 7265 2075 6e69 6e73 7461 6c6c 7320 dure uninstalls \n+00008d50: 7468 6520 6275 6666 6572 2070 7265 7669 the buffer previ\n+00008d60: 6f75 736c 7920 696e 7374 616c 6c65 6420 ously installed \n+00008d70: 6279 202a 6e6f 7465 0a20 2020 2020 5365 by *note. Se\n+00008d80: 745f 4275 6666 6572 2028 7072 6f63 6564 t_Buffer (proced\n+00008d90: 7572 6529 3a3a 2e20 2049 6620 616e 7920 ure)::. If any \n+00008da0: 6461 7461 2069 7320 7374 696c 6c20 7072 data is still pr\n+00008db0: 6573 656e 7420 696e 2074 6865 0a20 2020 esent in the. \n+00008dc0: 2020 6275 6666 6572 2c20 6974 2077 696c buffer, it wil\n+00008dd0: 6c20 6265 206c 6f73 742e 2020 546f 2061 l be lost. To a\n+00008de0: 766f 6964 2074 6869 7320 7369 7475 6174 void this situat\n+00008df0: 696f 6e2c 2074 6865 2062 7566 6665 7220 ion, the buffer \n+00008e00: 6361 6e0a 2020 2020 2062 6520 666c 7573 can. be flus\n+00008e10: 6865 6420 6279 2063 616c 6c69 6e67 202a hed by calling *\n+00008e20: 6e6f 7465 2047 6574 2028 6675 6e63 7469 note Get (functi\n+00008e30: 6f6e 293a 3a2e 0a0a 1f0a 4669 6c65 3a20 on)::.....File: \n+00008e40: 6164 6173 6f63 6b65 7473 2e69 6e66 6f2c adasockets.info,\n+00008e50: 2020 4e6f 6465 3a20 536f 636b 6574 732e Node: Sockets.\n+00008e60: 4d75 6c74 6963 6173 7420 7061 636b 6167 Multicast packag\n+00008e70: 652c 2020 4e65 7874 3a20 536f 636b 6574 e, Next: Socket\n+00008e80: 732e 4e61 6d69 6e67 2070 6163 6b61 6765 s.Naming package\n+00008e90: 2c20 2050 7265 763a 2053 6f63 6b65 7473 , Prev: Sockets\n+00008ea0: 2070 6163 6b61 6765 2c20 2055 703a 2054 package, Up: T\n+00008eb0: 6f70 0a0a 3520 536f 636b 6574 732e 4d75 op..5 Sockets.Mu\n+00008ec0: 6c74 6963 6173 7420 7061 636b 6167 650a lticast package.\n+00008ed0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a ****************\n+00008ee0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a0a 0a54 6865 ***********..The\n+00008ef0: 20e2 8098 536f 636b 6574 732e 4d75 6c74 ...Sockets.Mult\n+00008f00: 6963 6173 74e2 8099 2061 6c6c 6f77 7320 icast... allows \n+00008f10: 7468 6520 6372 6561 7469 6f6e 206f 6620 the creation of \n+00008f20: 4950 206d 756c 7469 6361 7374 2073 6f63 IP multicast soc\n+00008f30: 6b65 7473 2e0a 0a20 2d2d 2053 6f63 6b65 kets... -- Socke\n+00008f40: 7473 2e4d 756c 7469 6361 7374 2e4d 756c ts.Multicast.Mul\n+00008f50: 7469 6361 7374 5f53 6f63 6b65 745f 4644 ticast_Socket_FD\n+00008f60: 3a20 7479 7065 204d 756c 7469 6361 7374 : type Multicast\n+00008f70: 5f53 6f63 6b65 745f 4644 2069 730a 2020 _Socket_FD is. \n+00008f80: 2020 2020 2020 2020 6e65 7720 536f 636b new Sock\n+00008f90: 6574 5f46 4420 7769 7468 2070 7269 7661 et_FD with priva\n+00008fa0: 7465 3b0a 2020 2020 2054 6865 20e2 8098 te;. The ...\n+00008fb0: 4d75 6c74 6963 6173 745f 536f 636b 6574 Multicast_Socket\n+00008fc0: 5f46 44e2 8099 2074 6167 6765 6420 7479 _FD... tagged ty\n+00008fd0: 7065 2064 6572 6976 6573 2066 726f 6d20 pe derives from \n+00008fe0: 7468 6520 e280 9853 6f63 6b65 745f 4644 the ...Socket_FD\n+00008ff0: e280 990a 2020 2020 2074 7970 652e 2020 .... type. \n+00009000: 4974 2067 6574 7320 696e 6974 6961 6c69 It gets initiali\n+00009010: 7a65 6420 6279 2063 616c 6c69 6e67 202a zed by calling *\n+00009020: 6e6f 7465 2043 7265 6174 655f 4d75 6c74 note Create_Mult\n+00009030: 6963 6173 745f 536f 636b 6574 0a20 2020 icast_Socket. \n+00009040: 2020 2866 756e 6374 696f 6e29 3a3a 2e20 (function)::. \n+00009050: 2041 6e20 756e 696e 6974 6961 6c69 7a65 An uninitialize\n+00009060: 6420 e280 984d 756c 7469 6361 7374 5f53 d ...Multicast_S\n+00009070: 6f63 6b65 745f 4644 e280 9920 6361 6e20 ocket_FD... can \n+00009080: 6265 0a20 2020 2020 7375 6363 6573 7366 be. successf\n+00009090: 756c 6c79 2063 6f6d 7061 7265 6420 746f ully compared to\n+000090a0: 20e2 8098 4e75 6c6c 5f4d 756c 7469 6361 ...Null_Multica\n+000090b0: 7374 5f53 6f63 6b65 745f 4644 e280 992e st_Socket_FD....\n+000090c0: 0a0a 2a20 4d65 6e75 3a0a 0a2a 2043 7265 ..* Menu:..* Cre\n+000090d0: 6174 655f 4d75 6c74 6963 6173 745f 536f ate_Multicast_So\n+000090e0: 636b 6574 2028 6675 6e63 7469 6f6e 293a cket (function):\n+000090f0: 3a0a 2020 2020 2020 2020 2020 2020 2020 :. \n+00009100: 2020 2020 2020 2020 2020 4372 6561 7465 Create\n+00009110: 2061 6e20 4950 206d 756c 7469 6361 7374 an IP multicast\n+00009120: 2073 6f63 6b65 740a 2a20 4372 6561 7465 socket.* Create\n+00009130: 5f4d 756c 7469 6361 7374 5f53 6f63 6b65 _Multicast_Socke\n+00009140: 7420 2866 756e 6374 696f 6e29 3a3a 0a20 t (function)::. \n+00009150: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00009160: 2020 2020 2020 2043 7265 6174 6520 616e Create an\n+00009170: 2049 5020 6d75 6c74 6963 6173 7420 736f IP multicast so\n+00009180: 636b 6574 0a0a 1f0a 4669 6c65 3a20 6164 cket....File: ad\n+00009190: 6173 6f63 6b65 7473 2e69 6e66 6f2c 2020 asockets.info, \n+000091a0: 4e6f 6465 3a20 4372 6561 7465 5f4d 756c Node: Create_Mul\n+000091b0: 7469 6361 7374 5f53 6f63 6b65 7420 2866 ticast_Socket (f\n+000091c0: 756e 6374 696f 6e29 2c20 204e 6578 743a unction), Next:\n+000091d0: 2043 7265 6174 655f 4d75 6c74 6963 6173 Create_Multicas\n+000091e0: 745f 536f 636b 6574 2028 6675 6e63 7469 t_Socket (functi\n+000091f0: 6f6e 292c 2020 5072 6576 3a20 4372 6561 on), Prev: Crea\n+00009200: 7465 5f4d 756c 7469 6361 7374 5f53 6f63 te_Multicast_Soc\n+00009210: 6b65 7420 2866 756e 6374 696f 6e29 2c20 ket (function), \n+00009220: 2055 703a 2053 6f63 6b65 7473 2e4d 756c Up: Sockets.Mul\n+00009230: 7469 6361 7374 2070 6163 6b61 6765 0a0a ticast package..\n+00009240: 4372 6561 7465 5f4d 756c 7469 6361 7374 Create_Multicast\n+00009250: 5f53 6f63 6b65 7420 2866 756e 6374 696f _Socket (functio\n+00009260: 6e29 0a3d 3d3d 3d3d 3d3d 3d3d 3d3d 3d3d n).=============\n+00009270: 3d3d 3d3d 3d3d 3d3d 3d3d 3d3d 3d3d 3d3d ================\n+00009280: 3d3d 3d3d 3d0a 0a50 5552 504f 5345 0a20 =====..PURPOSE. \n+00009290: 2020 2020 4372 6561 7465 2061 6e20 4950 Create an IP\n+000092a0: 206d 756c 7469 6361 7374 2073 6f63 6b65 multicast socke\n+000092b0: 740a 5052 4f54 4f54 5950 450a 2020 2020 t.PROTOTYPE. \n+000092c0: 2020 2d2d 2053 6f63 6b65 7473 2e4d 756c -- Sockets.Mul\n+000092d0: 7469 6361 7374 2e43 7265 6174 655f 4d75 ticast.Create_Mu\n+000092e0: 6c74 6963 6173 745f 536f 636b 6574 3a20 lticast_Socket: \n+000092f0: 6675 6e63 7469 6f6e 0a20 2020 2020 2020 function. \n+00009300: 2020 2020 2020 2020 4372 6561 7465 5f4d Create_M\n+00009310: 756c 7469 6361 7374 5f53 6f63 6b65 7420 ulticast_Socket \n+00009320: 2847 524f 5550 203a 2053 7472 696e 673b (GROUP : String;\n+00009330: 2050 4f52 5420 3a20 4e61 7475 7261 6c3b PORT : Natural;\n+00009340: 0a20 2020 2020 2020 2020 2020 2020 2020 . \n+00009350: 5454 4c20 3a20 506f 7369 7469 7665 203a TTL : Positive :\n+00009360: 3d20 3136 3b20 5345 4c46 5f4c 4f4f 5020 = 16; SELF_LOOP \n+00009370: 3a20 426f 6f6c 6561 6e20 3a3d 2054 7275 : Boolean := Tru\n+00009380: 653b 0a20 2020 2020 2020 2020 2020 2020 e;. \n+00009390: 2020 4c4f 4341 4c5f 4946 203a 2053 7472 LOCAL_IF : Str\n+000093a0: 696e 6720 3a3d 2030 2e30 2e30 2e30 290a ing := 0.0.0.0).\n+000093b0: 2020 2020 2020 2020 2020 2020 2020 2072 r\n+000093c0: 6574 7572 6e20 4d75 6c74 6963 6173 745f eturn Multicast_\n+000093d0: 536f 636b 6574 5f46 443b 0a0a 5041 5241 Socket_FD;..PARA\n+000093e0: 4d45 5445 5253 0a20 2020 2020 4752 4f55 METERS. GROU\n+000093f0: 5020 2020 2020 2069 6e20 2020 2020 2020 P in \n+00009400: 2020 4950 2061 6464 7265 7373 206f 6620 IP address of \n+00009410: 7468 6520 6d75 6c74 6963 6173 7420 6772 the multicast gr\n+00009420: 6f75 7020 746f 0a20 2020 2020 2020 2020 oup to. \n+00009430: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00009440: 2020 6a6f 696e 0a20 2020 2020 504f 5254 join. PORT\n+00009450: 2020 2020 2020 2069 6e20 2020 2020 2020 in \n+00009460: 2020 506f 7274 206f 6620 7468 6520 6d75 Port of the mu\n+00009470: 6c74 6963 6173 7420 6772 6f75 7020 746f lticast group to\n+00009480: 206a 6f69 6e0a 2020 2020 2054 544c 2020 join. TTL \n+00009490: 2020 2020 2020 696e 2020 2020 2020 2020 in \n+000094a0: 2054 696d 652d 746f 2d6c 6976 6520 6f66 Time-to-live of\n+000094b0: 2073 656e 7420 7061 636b 6574 730a 2020 sent packets. \n+000094c0: 2020 2053 454c 465f 4c4f 4f50 2020 696e SELF_LOOP in\n+000094d0: 2020 2020 2020 2020 2053 686f 756c 6420 Should \n+000094e0: 7468 6520 736f 636b 6574 2072 6563 6569 the socket recei\n+000094f0: 7665 2074 6865 2070 6163 6b65 7473 0a20 ve the packets. \n+00009500: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00009510: 2020 2020 2020 2020 2020 7365 6e74 2066 sent f\n+00009520: 726f 6d20 7468 6520 6c6f 6361 6c20 686f rom the local ho\n+00009530: 7374 3f0a 2020 2020 204c 4f43 414c 5f49 st?. LOCAL_I\n+00009540: 4620 2020 696e 2020 2020 2020 2020 2041 F in A\n+00009550: 6464 7265 7373 206f 6620 7468 6520 6c6f ddress of the lo\n+00009560: 6361 6c20 696e 7465 7266 6163 6520 746f cal interface to\n+00009570: 2075 7365 0a0a 5245 5455 524e 2056 414c use..RETURN VAL\n+00009580: 5545 0a20 2020 2020 5468 6520 6e65 7720 UE. The new \n+00009590: 696e 6974 6961 6c69 7a65 6420 6d75 6c74 initialized mult\n+000095a0: 6963 6173 7420 736f 636b 6574 0a0a 4445 icast socket..DE\n+000095b0: 5343 5249 5054 494f 4e0a 2020 2020 2054 SCRIPTION. T\n+000095c0: 6869 7320 6675 6e63 7469 6f6e 2063 7265 his function cre\n+000095d0: 6174 6573 2061 6e20 4950 206d 756c 7469 ates an IP multi\n+000095e0: 6361 7374 2073 6f63 6b65 7420 6174 7461 cast socket atta\n+000095f0: 6368 6564 2074 6f20 6120 6769 7665 6e0a ched to a given.\n+00009600: 2020 2020 2067 726f 7570 2c20 6964 656e group, iden\n+00009610: 7469 6669 6564 2062 7920 6974 7320 636c tified by its cl\n+00009620: 6173 7320 4520 4950 2061 6464 7265 7373 ass E IP address\n+00009630: 2061 6e64 2070 6f72 742e 0a0a 2020 2020 and port... \n+00009640: 2042 6520 6361 7265 6675 6c20 7768 656e Be careful when\n+00009650: 2063 686f 6f73 696e 6720 7468 6520 5454 choosing the TT\n+00009660: 4c20 7061 7261 6d65 7465 7220 6f66 2079 L parameter of y\n+00009670: 6f75 7220 4950 206d 756c 7469 6361 7374 our IP multicast\n+00009680: 0a20 2020 2020 736f 636b 6574 2e20 204d . socket. M\n+00009690: 6f73 7420 4950 206d 756c 7469 6361 7374 ost IP multicast\n+000096a0: 2072 6f75 7465 7273 2064 6f20 696d 706c routers do impl\n+000096b0: 656d 656e 7420 7468 7265 7368 6f6c 642d ement threshold-\n+000096c0: 6261 7365 640a 2020 2020 2066 696c 7465 based. filte\n+000096d0: 7269 6e67 2061 6e64 2077 696c 6c20 6e6f ring and will no\n+000096e0: 7420 6c65 7420 4950 206d 756c 7469 6361 t let IP multica\n+000096f0: 7374 2070 6163 6b65 7473 206c 6561 7665 st packets leave\n+00009700: 2079 6f75 720a 2020 2020 206f 7267 616e your. organ\n+00009710: 697a 6174 696f 6e20 6966 2074 6865 2054 ization if the T\n+00009720: 544c 206f 6e20 7468 6520 6c61 7374 2072 TL on the last r\n+00009730: 6f75 7465 7220 6973 2073 6d61 6c6c 6572 outer is smaller\n+00009740: 2074 6861 6e20 3136 2e0a 0a20 2020 2020 than 16... \n+00009750: 4966 2030 2069 7320 6769 7665 6e20 666f If 0 is given fo\n+00009760: 7220 7468 6520 506f 7274 2c20 6120 6c6f r the Port, a lo\n+00009770: 6361 6c20 6f6e 6520 7769 6c6c 2062 6520 cal one will be \n+00009780: 6368 6f73 656e 2e20 2049 7420 6361 6e0a chosen. It can.\n+00009790: 2020 2020 2074 6865 6e20 6c61 7465 7220 then later \n+000097a0: 6265 2072 6574 7269 6576 6564 2075 7369 be retrieved usi\n+000097b0: 6e67 2047 6574 5f53 6f63 6b5f 506f 7274 ng Get_Sock_Port\n+000097c0: 2e0a 0a45 5841 4d50 4c45 0a20 2020 2020 ...EXAMPLE. \n+000097d0: 2020 2020 2064 6563 6c61 7265 0a20 2020 declare. \n+000097e0: 2020 2020 2020 2020 2020 536f 636b 203a Sock :\n+000097f0: 204d 756c 7469 6361 7374 5f53 6f63 6b65 Multicast_Socke\n+00009800: 745f 4644 3b0a 2020 2020 2020 2020 2020 t_FD;. \n+00009810: 6265 6769 6e0a 2020 2020 2020 2020 2020 begin. \n+00009820: 2020 202d 2d20 4372 6561 7465 2061 206d -- Create a m\n+00009830: 756c 7469 6361 7374 2073 6f63 6b65 7420 ulticast socket \n+00009840: 6f6e 2067 726f 7570 2032 3234 2e31 2e32 on group 224.1.2\n+00009850: 2e33 2070 6f72 7420 3837 3633 0a20 2020 .3 port 8763. \n+00009860: 2020 2020 2020 2020 2020 536f 636b 203a Sock :\n+00009870: 3d20 4372 6561 7465 5f4d 756c 7469 6361 = Create_Multica\n+00009880: 7374 5f53 6f63 6b65 7420 2822 3232 342e st_Socket (\"224.\n+00009890: 312e 322e 3322 2c20 3837 3633 293b 0a20 1.2.3\", 8763);. \n+000098a0: 2020 2020 2020 2020 2020 2020 2d2d 2050 -- P\n+000098b0: 6572 666f 726d 2073 6f6d 6520 6f70 6572 erform some oper\n+000098c0: 6174 696f 6e73 206f 6e20 736f 636b 6574 ations on socket\n+000098d0: 0a20 2020 2020 2020 2020 2020 2020 5b2e . [.\n+000098e0: 2e2e 5d0a 2020 2020 2020 2020 2020 2020 ..]. \n+000098f0: 202d 2d20 5368 7574 646f 776e 2074 6865 -- Shutdown the\n+00009900: 2073 6f63 6b65 7420 696e 2062 6f74 6820 socket in both \n+00009910: 6469 7265 6374 696f 6e73 0a20 2020 2020 directions. \n+00009920: 2020 2020 2020 2020 5368 7574 646f 776e Shutdown\n+00009930: 2028 536f 636b 2c20 426f 7468 293b 0a20 (Sock, Both);. \n 00009940: 2020 2020 2020 2020 2065 6e64 3b0a 0a53 end;..S\n 00009950: 4545 2041 4c53 4f0a 2020 2020 202a 6e6f EE ALSO. *no\n 00009960: 7465 2053 656e 6420 2870 726f 6365 6475 te Send (procedu\n 00009970: 7265 293a 3a2c 0a20 2020 2020 2a6e 6f74 re)::,. *not\n 00009980: 6520 5368 7574 646f 776e 2028 7072 6f63 e Shutdown (proc\n 00009990: 6564 7572 6529 3a3a 2e0a 0a2a 204d 656e edure)::...* Men\n 000099a0: 753a 0a0a 4372 6561 7465 5f4d 756c 7469 u:..Create_Multi\n@@ -3534,15 +3534,15 @@\n 0000dcd0: 636b 6574 203c 323e 3a20 2020 2020 2020 cket <2>: \n 0000dce0: 2020 2020 4372 6561 7465 5f4d 756c 7469 Create_Multi\n 0000dcf0: 6361 7374 5f53 6f63 6b65 7420 2866 756e cast_Socket (fun\n 0000dd00: 6374 696f 6e29 2e0a 2020 2020 2020 2020 ction).. \n 0000dd10: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000dd20: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000dd30: 2020 2020 2020 2020 2020 2020 2020 2020 \n-0000dd40: 2020 2020 2020 2028 6c69 6e65 2037 3129 (line 71)\n+0000dd40: 2020 2020 2020 2028 6c69 6e65 2036 3329 (line 63)\n 0000dd50: 0a2a 2043 7265 6174 696e 6720 6120 6d75 .* Creating a mu\n 0000dd60: 6c74 6963 6173 7420 736f 636b 6574 3a20 lticast socket: \n 0000dd70: 2020 2020 2020 2020 2020 5365 7474 696e Settin\n 0000dd80: 6720 7570 206d 756c 7469 6361 7374 2073 g up multicast s\n 0000dd90: 6f63 6b65 7473 2e0a 2020 2020 2020 2020 ockets.. \n 0000dda0: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000ddb0: 2020 2020 2020 2020 2020 2020 2020 2020 \n@@ -3562,15 +3562,15 @@\n 0000de90: 636b 6574 203c 323e 3a20 2020 2020 2020 cket <2>: \n 0000dea0: 4372 6561 7465 5f4d 756c 7469 6361 7374 Create_Multicast\n 0000deb0: 5f53 6f63 6b65 7420 2866 756e 6374 696f _Socket (functio\n 0000dec0: 6e29 2e0a 2020 2020 2020 2020 2020 2020 n).. \n 0000ded0: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000dee0: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000def0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-0000df00: 2020 2028 6c69 6e65 2036 3829 0a2a 2043 (line 68).* C\n+0000df00: 2020 2028 6c69 6e65 2036 3029 0a2a 2043 (line 60).* C\n 0000df10: 7265 6174 696e 6720 6120 7365 7276 6572 reating a server\n 0000df20: 3a20 2020 2020 2020 2020 2020 2020 2020 : \n 0000df30: 2020 2020 2020 4269 6e64 2028 7072 6f63 Bind (proc\n 0000df40: 6564 7572 6529 2e20 2020 2020 286c 696e edure). (lin\n 0000df50: 6520 2036 290a 2a20 4372 6561 7469 6e67 e 6).* Creating\n 0000df60: 2061 2073 6f63 6b65 743a 2020 2020 2020 a socket: \n 0000df70: 2020 2020 2020 2020 2020 2020 2020 2053 S\n@@ -3599,15 +3599,15 @@\n 0000e0e0: 2020 2020 2020 2020 2020 2020 4372 6561 Crea\n 0000e0f0: 7465 5f4d 756c 7469 6361 7374 5f53 6f63 te_Multicast_Soc\n 0000e100: 6b65 7420 2866 756e 6374 696f 6e29 2e0a ket (function)..\n 0000e110: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000e120: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000e130: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000e140: 2020 2020 2020 2020 2020 2020 2020 2028 (\n-0000e150: 6c69 6e65 2036 3829 0a2a 2043 7265 6174 line 68).* Creat\n+0000e150: 6c69 6e65 2036 3029 0a2a 2043 7265 6174 line 60).* Creat\n 0000e160: 696e 6720 6120 5443 5020 736f 636b 6574 ing a TCP socket\n 0000e170: 3a20 2020 2020 2020 2020 2020 2020 2020 : \n 0000e180: 2020 5365 7474 696e 6720 7570 2075 6e69 Setting up uni\n 0000e190: 6361 7374 2073 6f63 6b65 7473 2e0a 2020 cast sockets.. \n 0000e1a0: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000e1b0: 2020 2020 2020 2020 2020 2020 2020 2020 \n 0000e1c0: 2020 2020 2020 2020 2020 2020 2020 2020 \n@@ -4504,15 +4504,15 @@\n 00011970: 536f 636b 6574 203c 323e 3a20 4372 6561 Socket <2>: Crea\n 00011980: 7465 5f4d 756c 7469 6361 7374 5f53 6f63 te_Multicast_Soc\n 00011990: 6b65 7420 2866 756e 6374 696f 6e29 2e0a ket (function)..\n 000119a0: 2020 2020 2020 2020 2020 2020 2020 2020 \n 000119b0: 2020 2020 2020 2020 2020 2020 2020 2020 \n 000119c0: 2020 2020 2020 2020 2020 2020 2020 2020 \n 000119d0: 2020 2020 2020 2020 2020 2020 2020 2028 (\n-000119e0: 6c69 6e65 2037 3629 0a2a 2053 6f63 6b65 line 76).* Socke\n+000119e0: 6c69 6e65 2036 3829 0a2a 2053 6f63 6b65 line 68).* Socke\n 000119f0: 7473 2e4e 616d 696e 672e 4164 6472 6573 ts.Naming.Addres\n 00011a00: 735f 4f66 3a20 2020 2020 2020 2020 2020 s_Of: \n 00011a10: 2020 4164 6472 6573 735f 4f66 2028 6675 Address_Of (fu\n 00011a20: 6e63 7469 6f6e 292e 0a20 2020 2020 2020 nction).. \n 00011a30: 2020 2020 2020 2020 2020 2020 2020 2020 \n 00011a40: 2020 2020 2020 2020 2020 2020 2020 2020 \n 00011a50: 2020 2020 2020 2020 2020 2020 2020 2020 \n@@ -4914,64 +4914,64 @@\n 00013310: 7269 656e 7465 6420 6578 6368 616e 6765 riented exchange\n 00013320: 737f 3736 3734 0a4e 6f64 653a 2053 6f63 s.7674.Node: Soc\n 00013330: 6b65 7473 2070 6163 6b61 6765 7f38 3830 kets package.880\n 00013340: 370a 4e6f 6465 3a20 4163 6365 7074 5f53 7.Node: Accept_S\n 00013350: 6f63 6b65 7420 2870 726f 6365 6475 7265 ocket (procedure\n 00013360: 297f 3131 3039 310a 4e6f 6465 3a20 4269 ).11091.Node: Bi\n 00013370: 6e64 2028 7072 6f63 6564 7572 6529 7f31 nd (procedure).1\n-00013380: 3331 3638 0a4e 6f64 653a 2043 6f6e 6e65 3168.Node: Conne\n+00013380: 3334 3938 0a4e 6f64 653a 2043 6f6e 6e65 3498.Node: Conne\n 00013390: 6374 2028 7072 6f63 6564 7572 6529 7f31 ct (procedure).1\n-000133a0: 3434 3435 0a4e 6f64 653a 2047 6574 2028 4445.Node: Get (\n-000133b0: 6675 6e63 7469 6f6e 297f 3135 3833 380a function).15838.\n+000133a0: 3437 3735 0a4e 6f64 653a 2047 6574 2028 4775.Node: Get (\n+000133b0: 6675 6e63 7469 6f6e 297f 3136 3136 380a function).16168.\n 000133c0: 4e6f 6465 3a20 4765 745f 4368 6172 2028 Node: Get_Char (\n-000133d0: 6675 6e63 7469 6f6e 297f 3137 3033 370a function).17037.\n+000133d0: 6675 6e63 7469 6f6e 297f 3137 3336 370a function).17367.\n 000133e0: 4e6f 6465 3a20 4765 745f 4c69 6e65 2028 Node: Get_Line (\n-000133f0: 6675 6e63 7469 6f6e 297f 3137 3930 320a function).17902.\n+000133f0: 6675 6e63 7469 6f6e 297f 3138 3233 320a function).18232.\n 00013400: 4e6f 6465 3a20 4765 745f 4c69 6e65 2028 Node: Get_Line (\n-00013410: 7072 6f63 6564 7572 6529 7f31 3932 3133 procedure).19213\n+00013410: 7072 6f63 6564 7572 6529 7f31 3935 3433 procedure).19543\n 00013420: 0a4e 6f64 653a 2047 6574 5f52 6563 6569 .Node: Get_Recei\n 00013430: 7665 5f51 7565 7565 5f53 697a 6520 2866 ve_Queue_Size (f\n-00013440: 756e 6374 696f 6e29 7f32 3033 3832 0a4e unction).20382.N\n+00013440: 756e 6374 696f 6e29 7f32 3037 3132 0a4e unction).20712.N\n 00013450: 6f64 653a 2047 6574 5f53 656e 645f 5175 ode: Get_Send_Qu\n 00013460: 6575 655f 5369 7a65 2028 6675 6e63 7469 eue_Size (functi\n-00013470: 6f6e 297f 3231 3235 300a 4e6f 6465 3a20 on).21250.Node: \n+00013470: 6f6e 297f 3231 3538 300a 4e6f 6465 3a20 on).21580.Node: \n 00013480: 4765 7473 6f63 6b6f 7074 2028 7072 6f63 Getsockopt (proc\n-00013490: 6564 7572 6529 7f32 3231 3037 0a4e 6f64 edure).22107.Nod\n+00013490: 6564 7572 6529 7f32 3234 3337 0a4e 6f64 edure).22437.Nod\n 000134a0: 653a 204c 6973 7465 6e20 2870 726f 6365 e: Listen (proce\n-000134b0: 6475 7265 297f 3233 3437 340a 4e6f 6465 dure).23474.Node\n+000134b0: 6475 7265 297f 3233 3830 340a 4e6f 6465 dure).23804.Node\n 000134c0: 3a20 4e65 775f 4c69 6e65 2028 7072 6f63 : New_Line (proc\n-000134d0: 6564 7572 6529 7f32 3433 3530 0a4e 6f64 edure).24350.Nod\n+000134d0: 6564 7572 6529 7f32 3436 3830 0a4e 6f64 edure).24680.Nod\n 000134e0: 653a 2050 7574 2028 7072 6f63 6564 7572 e: Put (procedur\n-000134f0: 6529 7f32 3530 3736 0a4e 6f64 653a 2050 e).25076.Node: P\n+000134f0: 6529 7f32 3534 3036 0a4e 6f64 653a 2050 e).25406.Node: P\n 00013500: 7574 5f4c 696e 6520 2870 726f 6365 6475 ut_Line (procedu\n-00013510: 7265 297f 3235 3831 310a 4e6f 6465 3a20 re).25811.Node: \n+00013510: 7265 297f 3236 3134 310a 4e6f 6465 3a20 re).26141.Node: \n 00013520: 5265 6365 6976 6520 2866 756e 6374 696f Receive (functio\n-00013530: 6e29 7f32 3636 3031 0a4e 6f64 653a 2052 n).26601.Node: R\n+00013530: 6e29 7f32 3639 3331 0a4e 6f64 653a 2052 n).26931.Node: R\n 00013540: 6563 6569 7665 2028 7072 6f63 6564 7572 eceive (procedur\n-00013550: 6529 7f32 3738 3134 0a4e 6f64 653a 2052 e).27814.Node: R\n+00013550: 6529 7f32 3831 3434 0a4e 6f64 653a 2052 e).28144.Node: R\n 00013560: 6563 6569 7665 5f53 6f6d 6520 2870 726f eceive_Some (pro\n-00013570: 6365 6475 7265 297f 3238 3834 350a 4e6f cedure).28845.No\n+00013570: 6365 6475 7265 297f 3239 3137 350a 4e6f cedure).29175.No\n 00013580: 6465 3a20 5365 6e64 2028 7072 6f63 6564 de: Send (proced\n-00013590: 7572 6529 7f33 3030 3336 0a4e 6f64 653a ure).30036.Node:\n+00013590: 7572 6529 7f33 3033 3636 0a4e 6f64 653a ure).30366.Node:\n 000135a0: 2053 6574 5f42 7566 6665 7220 2870 726f Set_Buffer (pro\n-000135b0: 6365 6475 7265 297f 3330 3737 390a 4e6f cedure).30779.No\n+000135b0: 6365 6475 7265 297f 3331 3130 390a 4e6f cedure).31109.No\n 000135c0: 6465 3a20 5365 7473 6f63 6b6f 7074 2028 de: Setsockopt (\n-000135d0: 7072 6f63 6564 7572 6529 7f33 3139 3932 procedure).31992\n+000135d0: 7072 6f63 6564 7572 6529 7f33 3233 3232 procedure).32322\n 000135e0: 0a4e 6f64 653a 2053 6875 7464 6f77 6e20 .Node: Shutdown \n-000135f0: 2870 726f 6365 6475 7265 297f 3333 3333 (procedure).3333\n+000135f0: 2870 726f 6365 6475 7265 297f 3333 3636 (procedure).3366\n 00013600: 390a 4e6f 6465 3a20 536f 636b 6574 2028 9.Node: Socket (\n-00013610: 7072 6f63 6564 7572 6529 7f33 3339 3839 procedure).33989\n+00013610: 7072 6f63 6564 7572 6529 7f33 3433 3139 procedure).34319\n 00013620: 0a4e 6f64 653a 2055 6e73 6574 5f42 7566 .Node: Unset_Buf\n 00013630: 6665 7220 2870 726f 6365 6475 7265 297f fer (procedure).\n-00013640: 3335 3337 390a 4e6f 6465 3a20 536f 636b 35379.Node: Sock\n+00013640: 3335 3730 390a 4e6f 6465 3a20 536f 636b 35709.Node: Sock\n 00013650: 6574 732e 4d75 6c74 6963 6173 7420 7061 ets.Multicast pa\n-00013660: 636b 6167 657f 3336 3037 380a 4e6f 6465 ckage.36078.Node\n+00013660: 636b 6167 657f 3336 3430 380a 4e6f 6465 ckage.36408.Node\n 00013670: 3a20 4372 6561 7465 5f4d 756c 7469 6361 : Create_Multica\n 00013680: 7374 5f53 6f63 6b65 7420 2866 756e 6374 st_Socket (funct\n-00013690: 696f 6e29 7f33 3639 3234 0a4e 6f64 653a ion).36924.Node:\n+00013690: 696f 6e29 7f33 3732 3534 0a4e 6f64 653a ion).37254.Node:\n 000136a0: 2053 6f63 6b65 7473 2e4e 616d 696e 6720 Sockets.Naming \n 000136b0: 7061 636b 6167 657f 3430 3938 300a 4e6f package.40980.No\n 000136c0: 6465 3a20 4164 6472 6573 735f 4f66 2028 de: Address_Of (\n 000136d0: 6675 6e63 7469 6f6e 297f 3433 3530 370a function).43507.\n 000136e0: 4e6f 6465 3a20 416e 795f 4164 6472 6573 Node: Any_Addres\n 000136f0: 7320 2866 756e 6374 696f 6e29 7f34 3434 s (function).444\n 00013700: 3031 0a4e 6f64 653a 2047 6574 5f50 6565 01.Node: Get_Pee\n"}]}]}]}]}]}