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: 103376,56e5e06428166864 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!news.buerger.net!uucp.gnuu.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: problems with interfacing c Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <8b6a5b24-5ab0-4d38-9be8-86911aba7fcf@k22g2000yqh.googlegroups.com> <13d5wy5ni51xh$.xnhoi3uhm9ql.dlg@40tude.net> <10wpqz6h1md5o.1gxwql45phwmt.dlg@40tude.net> Date: Fri, 21 Jan 2011 10:33:08 +0100 Message-ID: <1w3z2o67rgffh.1cdk4u3l4degh$.dlg@40tude.net> NNTP-Posting-Date: 21 Jan 2011 10:33:08 CET NNTP-Posting-Host: 0147a54f.newsspool4.arcor-online.net X-Trace: DXC=DiZ]7634IUK7enW;^6ZC`4\`mfM[68DC3o;hUS0F1kY? X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:17575 Date: 2011-01-21T10:33:08+01:00 List-Id: On Fri, 21 Jan 2011 01:46:24 +0100, Yannick Duch�ne (Hibou57) wrote: > Le Fri, 21 Jan 2011 00:03:22 +0100, Dmitry A. Kazakov > a �crit: >>> Some body do, for some kind of raw IO. Just that this may be more >>> oftenly >>> something like >>> Character'Read (Standard_Input), C); >> >> That the point, when reading characters that suggests some character stream >> oriented protocol. Dealing with such protocols one would never read 100K in >> one chunk. Because if the client does something wrong that would deadlock >> forever. > This could block for a single character as much. Before you start reading the next character you check for the protocol errors and the client state. One typical case of deadlock is that you occasionally received some garbage (UDP, RS232 w/o handshake) or that the client responded with an emergency "out-of-band" request waiting for confirmation while you keep on reading the standard response of a longer length. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de