🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #6470

Re: Pipes, sockets and coms processes

#6470
From: Fletcher Kittredge
Date: Sat, 12 Jan 1991 15:16
16 lines
1409 bytes
In article <1180@brchh104.bnr.ca> rbs@aiai.ed.ac.uk (Robert Scott) writes:
>Given two processes communicating via a socket, how does the receiver know
>the length of the senders message?  In the relevant manual on
>interprocessor communication the examples given send fixed length
>messages. I need to be able to send variable length messages where the
>receiver won't know message length at compile time.

What is your protocol?  TCP/IP is a byte stream protocol, so if you are
using it, then you will have define your own protocol to send your own
packet headers with lengths for the data portion of the messages.  This is
less difficult than it sounds.  I recommend that you pick up a copy of
Stevens, "Unix Network Programming" [Prentice-Hall]

Regards,
Fletcher Kittredge
617-873-3465  /  fkittred@bbn.com  /  fkittred@das.harvard.edu
Technical Details
Message-ID: <1213@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: fkittred@spca.bbn.com (Fletcher Kittredge)
Newsgroups: comp.sys.sun
Subject: Re: Pipes, sockets and coms processes
Keywords: Networks
Message-ID: <1213@brchh104.bnr.ca>
Date: 12 Jan 91 15:16:13 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 16
Approved: Sun-Spots@rice.edu
X-Refs:  Original: v10n4
X-Sun-Spots-Digest: Volume 10, Issue 18, message 2
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu