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=1.0 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ff1f0403676a2300 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.236.170.1 with SMTP id o1mr11192009yhl.42.1344998913155; Tue, 14 Aug 2012 19:48:33 -0700 (PDT) Path: c6ni115581197qas.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada Networking (General/Design) Date: Mon, 13 Aug 2012 15:11:54 +0200 Organization: cbb software GmbH Message-ID: <1mh1yp066mx2s$.qm3xmvhevpf$.dlg@40tude.net> References: <08540a65-8d88-4042-b021-52c49b2e6772@googlegroups.com> <2de69490-cbc2-4f58-af8a-db5bee3fd665@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.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-08-13T15:11:54+02:00 List-Id: On Mon, 13 Aug 2012 05:33:28 -0700 (PDT), Patrick wrote: > Does anyone have a favourite approach to TCP/IP ? TCP vs. UDP changes little (when point to point). You still have packet even when sent over TCP stream. It is difficult to outline a universal solution for all case. There are a reader and a writer tasks encapsulated into I/O objects. There are packages implementing protocol layers. Each layer object derives from or otherwise uses the lower level object in a mix-in. Lower layers provide operations for the higher levels and define abstract operations or callback to override. Two tasks have the advantage of having it full-duplex (performance, deadlock prevention upon protocol errors), being able to use blocking calls. It may impose some difficulties as you would likely have to route actions from the writer to the reader task. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de