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,8ab6ed0f71c479cd X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sun, 23 Nov 2008 00:01:53 +0100 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: API design problem - buffer scatter I/O References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <49288f63$0$31337$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 23 Nov 2008 00:01:55 CET NNTP-Posting-Host: bd6f933c.newsspool4.arcor-online.net X-Trace: DXC=59TcEEf]46m016@cHD@m;j4IUKH_hKQDKiQ7h52k X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:2755 Date: 2008-11-23T00:01:55+01:00 List-Id: Maciej Sobczak wrote: > Do you have other ideas or suggestions for how to design such API? Not sure this would meet your criteria but perhaps you could ask the user to provide a Cursor. The filling procedure can fill the cells one after the other by obtaining a pointer, say, through Element. procedure Receive_Socket (Socket : Socket_Type; Item : in out Cursor) is while loop Element(Item).all := ; Next(Item); end loop; end Receive_Socket; where Element, by contract, would be a function that returns a pointer to the next free cell which would be in some of the buffers. This, of course, shifts the problem of managing multiple buffers elswhere...