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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:24e:: with SMTP id 75mr5035827itu.0.1549517301333; Wed, 06 Feb 2019 21:28:21 -0800 (PST) X-Received: by 2002:a9d:6f14:: with SMTP id n20mr176974otq.2.1549517301069; Wed, 06 Feb 2019 21:28:21 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!q69no93202itb.0!news-out.google.com!v71ni116ita.0!nntp.google.com!q69no93196itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 6 Feb 2019 21:28:20 -0800 (PST) In-Reply-To: <818f5ff4-f18d-42b8-950d-9b597c012aa4@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=191.17.174.180; posting-account=TRgI1QoAAABSsYi-ox3Pi6N-JEKKU0cu NNTP-Posting-Host: 191.17.174.180 References: <47f17695-f9a5-4024-b2da-3f13209dc4fd@googlegroups.com> <818f5ff4-f18d-42b8-950d-9b597c012aa4@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <62406dfb-54c9-4db3-b461-0ad72d4a782c@googlegroups.com> Subject: Re: Ada x Datagram Sockets From: "Rego, P." Injection-Date: Thu, 07 Feb 2019 05:28:21 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:55450 Date: 2019-02-06T21:28:20-08:00 List-Id: On Wednesday, February 6, 2019 at 10:42:56 PM UTC-2, Jere wrote: > On Wednesday, February 6, 2019 at 6:10:37 PM UTC-5, Rego, P. wrote: > > I am trying to communicate a Windows Ada application with another application in the same machine (an specific C++ porting called MQL) using datagram sockets. The core Ada app was extracted from GNAT.Sockets documentation, from the ping-pong caller. > > *SNIPPED* > > > > The problem is that when I send the message (from MQL side), my Ada server returns > > > > raised GNAT.SOCKETS.SOCKET_ERROR : [10040] Message too long > > Call stack traceback locations: > > 0x424e6c 0x426ddb 0x426e17 0x4200a8 0x42174e 0x4019fc 0x40246d 0x4013db 0x74198482 0x778f3ab6 0x778f3a86 > > > > and investigating the libraries, Channel : SOCKETS.Stream_Access will really receive any data size. > > > > So... how can avoid the exception? > > > > Thanks! > > How big of a message are you trying to send? Datagram sockets have > an upper limit on the payload size (65507 bytes for ipv4) regardless > of the language. Just the string "test". I also confirmed that the MQL container (uchar data[]) has really the size 5. I also forgot to mention that the communication from both client-server applications show no problem at all, I mean, MQL to MQL and Ada to Ada have no errors. The problem comes only when trying MQL to Ada.