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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Questions about socket programming Date: Tue, 13 Jan 2015 22:17:10 +0100 Organization: cbb software GmbH Message-ID: <1etuloyoqyw58$.1fsfv4dr78jaa.dlg@40tude.net> References: <%pzmw.361295$Mq4.223465@fx25.iad> <1vt5kszrayia0$.18j888endc4qm.dlg@40tude.net> <3sb8ba1api5dg7ip82n56n34oa0hi5pv5s@4ax.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: C0sjVBn1o+rapsxuA3K9YA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:24567 Date: 2015-01-13T22:17:10+01:00 List-Id: On Tue, 13 Jan 2015 12:31:29 -0800, Hubert wrote: > Yes, I should have mentioned that. I use Raknet which has it's own data > wrapper and assembles data on the receiving end correctly so you always > get one read fro one send. But of course I can't use that for mey telnet > server project, so here I'm dealing with new stuff. Good to know that > thre are these problems on the TCP/IP level, I will see to it that I > treat everything that I read out as a stream of bytes The state machine I mentioned before handles this. You put a terminated string element into the derived type with 'CR' as the terminator. Next you put expected element, that expects 'LF'. That will cause Process_Packet called each time a complete line was received. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de