www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/30/07:55:12

Date: Tue, 30 Sep 1997 13:49:46 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>
cc: djgpp AT delorie DOT com, Michael Mauch <michael DOT mauch AT gmx DOT de>
Subject: Re: DJGPP, interprocess communication, and DPMI
In-Reply-To: <m0xFeLz-000S1xC@inti.gov.ar>
Message-ID: <Pine.SUN.3.91.970930134908.6040L-100000@is>
MIME-Version: 1.0

On Mon, 29 Sep 1997, Salvador Eduardo Tropea (SET) wrote:

> Is easy to communicate only 2 process but for more I think is more complex.
> Any ideas?

First, you can have separate buffers for each connection, allocated by
the TSR when the connection is established.  Then each pair of
processes only checks its own buffer for any new data.

If that's too complicated, or wastes too much memory, a single buffer
could be used, with a special magic signature at the beginning of data
that identifies the connection.  (The first data exchange would then
need to be with some kind of generic sugnature and hold the specific
signature to be used for the rest of the connection.)

There's also a problem of using the same buffer for reading and
writing by several pairs of connected processes.  A simple solution
would be to wait until the buffer is emptied (if the message in the
buffer appears to belong to another connection).  Another possibility
is to allow appending data to the buffer without destroying its
previous contents and making it possible for the reading side to read
and empty only part of the buffer's data.

Anyway, these problems are solvable, one way or the other.  So I would
suggest at first to make this work for a single connection, and leave
improvements to later releases.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019