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: 103376,136c120daac2a1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail From: Dave Thompson Newsgroups: comp.lang.ada Subject: Re: tasksing and TCP sockets Message-ID: References: X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 06 Feb 2006 05:02:16 GMT NNTP-Posting-Host: 12.75.255.155 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1139202136 12.75.255.155 (Mon, 06 Feb 2006 05:02:16 GMT) NNTP-Posting-Date: Mon, 06 Feb 2006 05:02:16 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:2789 Date: 2006-02-06T05:02:16+00:00 List-Id: On Tue, 31 Jan 2006 00:59:45 -0600, tmoran@acm.org wrote: > >You should _not_ need delay statements. Redesign to be waiting on > >socket completions. > If the allowed response latency isn't terribly short (and it doesn't > sound like it is here) there's nothing wrong with letting the system > buffer up input while the reading task does a delay. Just use a blocking > socket and poll to see if there's more input data available. Remember > that "waiting on socket completions" in Windows means "polling the Windows > message loop for a socket completion message". In Windows-the-GUI, or at least for a GUI task/thread on Windows. But for Windows-the-OS (a non-GUI task/thread or "console" program) plain old recv() and if you wish select() work just fine. I feel impelled to re-quote this prior line: > TCP server that simulates the world I realize it makes sense in the context of the OP system description, but just looking at it in isolation reminded me all too forcefully of any number of past project breakdown/deliverable items with demure-looking descriptions that turned out to be disasters. - David.Thompson1 at worldnet.att.net