From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e8c6974546bc3f7f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.19.194 with SMTP id h2mr82394wie.0.1354330138231; Fri, 30 Nov 2012 18:48:58 -0800 (PST) Path: q13ni98349wii.0!nntp.google.com!feeder3.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newspeer1.nac.net!news.mi.ras.ru!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Sockets Example Sought Date: Sat, 24 Nov 2012 22:01:34 +0100 Organization: cbb software GmbH Message-ID: <17btkxe7c0dse.1dndrk5qjz65x.dlg@40tude.net> References: <2012112311175432190-rblove@airmailnet> <2012112315585358568-rblove@airmailnet> <17vopoh3g5mg4.jv11ioybge4k$.dlg@40tude.net> <2012112412270484092-rblove@airmailnet> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: kWJV5lTRAyCzy8lsfOrlcw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-11-24T22:01:34+01:00 List-Id: On Sat, 24 Nov 2012 12:27:04 -0600, Robert Love wrote: > The statements about disposing of Data, what does Shutdown_Socket it > do? It seems to end my task and never reach the following Close_Socket > statement. If I leave it out, I see Close_Socket execute and the > program seems to run fine. Shutdown_Socket does a graceful disconnection before closing the socket. In particular it flushes/drops pending data. Under Windows it is important to call it in order to be able to open another socket for the same port. Otherwise it may take some considerable time after Close_Socket before the port becomes free. The effect is that you may experience sporadic "port in use" errors, e.g. when restarting the program. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de