🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #6469

Re: Pipes, sockets and coms processes

#6469
From: Rich Stevens
Date: Sat, 12 Jan 1991 13:04
18 lines
1500 bytes
In article <1180@brchh104.bnr.ca> rbs@aiai.ed.ac.uk (Robert Scott) writes:
>My question is:
>
>Given two processes communicating via a socket, how does the receiver know
>the length of the senders message?

The answer is: it depends on the underlying protocol being used with the
socket.  If you're using a stream protocol such as TCP, there are no
record boundaries at all provided by the system.  The applications at both
ends have to build them and use them.  Common examples are newlines to
mark lines with ascii text or one or more count bytes in front of every
record.  If you're using a datagram protocol such as UDP, each datagram
can be considered a "record".  But, beware of lots of other subtleties if
you use a datagram approach (loss of datagrams, buffer space, etc.).
Sounds like what you're looking for is something like Xerox's SPP--a
reliable protocol with record boundaries.  But, Suns don't come with it.

	Rich Stevens
Technical Details
Message-ID: <1212@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: rstevens@noao.edu (Rich Stevens)
Newsgroups: comp.sys.sun
Subject: Re: Pipes, sockets and coms processes
Keywords: Networks
Message-ID: <1212@brchh104.bnr.ca>
Date: 12 Jan 91 13:04:52 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 18
Approved: Sun-Spots@rice.edu
X-Refs:  Original: v10n4
X-Sun-Spots-Digest: Volume 10, Issue 18, message 1
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu