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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,deffccd74319c23d,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail From: "markp" Newsgroups: comp.lang.ada Subject: Sending Variable Length Messages with GNAT.Sockets Date: 9 May 2005 03:11:52 -0700 Organization: http://groups.google.com Message-ID: <1115633512.107824.259680@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: 208.20.220.72 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1115633516 12546 127.0.0.1 (9 May 2005 10:11:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 9 May 2005 10:11:56 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=208.20.220.72; posting-account=_Inhcg0AAAAPC2BsuUqoGG-atarvM4_J Xref: g2news1.google.com comp.lang.ada:10965 Date: 2005-05-09T03:11:52-07:00 List-Id: I am currently using GNAT.Sockets to send data via streams. A snippet of my code is is as follows: . . My_Stream_Access := GNAT.Sockets.Stream(Socket => Socket); . . Msg_Types.Msg_Header_Type'Write( My_Stream_Access, Msg_Type); This code works fine. It appears GNAT.Sockets works off a message type in this manner. My question is: What if the data type "Msg_Type" was a variable length message? Is there a way to send only "x" bytes for Msg_Type, and not the entire thing? Thanks, Mark