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,7db5fb0599fd4b76 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 02 May 2005 18:42:21 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: TCP/IP Sockets with GNAT.Sockets References: <030520050010146101%jaco@neottia.net> X-Newsreader: Tom's custom newsreader Message-ID: Date: Mon, 02 May 2005 18:42:21 -0500 NNTP-Posting-Host: 24.6.127.15 X-Trace: sv3-pMArlaef/mQsMKGOjeLlpHemXbwWKstGHT9j2evWZGEpKycMUtimZFA9NhqIIDTh910mznXuM1CInti!29ZEY0/+AnsXxqQ1dnhlEgTPoPuZ6pVJxGyp28Vt3AohfSs7ab7qnSNZF6g= X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:10891 Date: 2005-05-02T18:42:21-05:00 List-Id: For POP3 and a bunch of other stuff you need an IO layer that buffers input and lets you read LF terminated strings, similar to Ada.Text_IO.Get_Line. eg type Socket_Type(Max_Line_Length: Positive) is new NC.Sockets.Socket_Type with private; procedure Get_Line(Socket : in out Socket_Type; Line : out String; Last : out Natural; Timeout : in Duration := 30.0); -- Return Line(Line'first .. Last) -- Input up through LF if LF occurs, -- Line(Line'range) if no LF seen, -- or Input up through last received char if timeout or hangup