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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,61ec2c598155da95 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!y9g2000yqg.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Aborting a call to Accept_Socket Date: Tue, 21 Apr 2009 14:03:01 -0700 (PDT) Organization: http://groups.google.com Message-ID: <22732da9-5129-4de4-8690-5eea24805b82@y9g2000yqg.googlegroups.com> References: <44d6b044-3cb8-402c-9b1f-afe39f6a47ce@r33g2000yqn.googlegroups.com> NNTP-Posting-Host: 83.79.48.174 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1240347781 30611 127.0.0.1 (21 Apr 2009 21:03:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 21 Apr 2009 21:03:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y9g2000yqg.googlegroups.com; posting-host=83.79.48.174; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:4549 Date: 2009-04-21T14:03:01-07:00 List-Id: On 21 Kwi, 17:40, Tony wrote: > I would like to abort a call to Accept_Socket() if no connection > request arrives within a specified time (20 seconds). Then you want to use the selector with timeout. In order to wait for the listening socket put it in the "reading" selector set. If the Check_Selector finishes with the Status equal to Completed, it means that you can call Accept_Socket without blocking, because there is an incoming connection pending. Otherwise the timeout has expired, which means that there was no incoming connection during the given time. >=A0For me, a quite > simple solution (perhaps not safe) is to use an asynchronous transfer > of control Unfortunately there is no integration of ATC and I/O. Expecially when it comes to non-standard I/O. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada