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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,2afbf99c1f65cbe X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.136.71 with SMTP id py7mr159801pbb.4.1344263767207; Mon, 06 Aug 2012 07:36:07 -0700 (PDT) Received: by 10.180.103.197 with SMTP id fy5mr1189153wib.1.1344263767096; Mon, 06 Aug 2012 07:36:07 -0700 (PDT) Path: g9ni23567626pbo.0!nntp.google.com!4no8412193pbo.1!news-out.google.com!q11ni72576585wiw.1!nntp.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!aioe.org!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Sharing a socket connection Date: Tue, 31 Jul 2012 13:50:31 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <87pq7c6tfc.fsf@adaheads.sparre-andersen.dk> References: <87hasofgwa.fsf@adaheads.sparre-andersen.dk> <16x1nvmt3gznc$.15s7zskookawr$.dlg@40tude.net> NNTP-Posting-Host: monowall.adaheads.com Mime-Version: 1.0 X-Trace: munin.nbi.dk 1343735431 7065 77.234.168.91 (31 Jul 2012 11:50:31 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 31 Jul 2012 11:50:31 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:j5nBJUdcu/9H4uaXISzwtk93zcQ= Content-Type: text/plain; charset=us-ascii Date: 2012-07-31T13:50:31+02:00 List-Id: Dmitry A. Kazakov wrote: > Jacob Sparre Andersen wrote: >> The socket connection is bidirectional with requests sent from a >> client followed by corresponding responses from the server. Each >> client should only get responses to its own requests. > > This sort of multiplexing will be extremely slow. Basically you block > communication until server respond. Yes. Fortunately that is not likely to be a problem for this application. > My primary concern would making it full duplex multiplexed. Because > half-duplex communication is really one of the major performance > killers. > > I would consider a request [protected] object queued to a dedicated > task doing I/O. The object would be waitable for the task that queued > it. Which is basically how OS drivers work. I'm not sure I understand what you mean. AFAIK protected objects can't queue on entries. Greetings, Jacob -- Photos from LinuxDay2005 in Cagliari: http://linuxday.gulch.it/2005/album/