home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!Germany.EU.net!rzsun2.informatik.uni-hamburg.de!arne
- From: arne@nats.informatik.uni-hamburg.de (Arne Ludwig)
- Subject: Re: Q: Proper client/server protocol w.r.t. socket read/writes
- Message-ID: <arne.721414999@nats5>
- Sender: news@informatik.uni-hamburg.de (Mr. News)
- Organization: University of Hamburg, FRG
- References: <0ck1+wp@rpi.edu>
- Date: 10 Nov 92 17:03:19 GMT
- Lines: 24
-
- cecchinr@gehrig.cs.rpi.edu (Ron Cecchini) writes:
- >every time she does a
- >write, she immediately does a read to acknowledge that the info got to
- >the other side
-
- >She says that when she didn't do this,
- >her application crashed because of some kind of "imbalance".
-
- You don't supply enough information, but this suggests to me that she
- might be using a stream socket and variable length messages.
-
- If she's not acknowledging the individual packets, this may, and almost
- always does, mean that some messages get mixed up with previous ones,
- because streams are not "packetized".
-
- You may think of avoiding this problem by using datagram sockets, but
- unfortunately most Unices don't give you reliable, sequenced delivery
- on datagrams sockets, so you would need the acknowledge after all.
-
- A very simple solution is to use fixed packet lengths, or transmitting
- length information with each packet.
- --
- Arne Ludwig
- ludwiga@informatik.uni-hamburg.de arne@rrzbu.hanse.de
-