[OpenAFS-devel] rx_FlushWrite
Jeffrey Hutzelman
jhutz@cmu.edu
Tue, 09 Mar 2004 14:14:46 -0500
On Tuesday, March 09, 2004 14:29:50 +0100 Soewono Effendi
<soewono.effendi@sysgo.com> wrote:
> Hello there,
>
> I'm looking for a way to flush rx-Write-Stream, but without closing the
> stream. I can't use rx_FlushWrite, since the stream will be closed.
To what end?
Rx call streams are not fully bidirectional; they are purely
one-request-one-response. The caller gets to send as much data as he
wants, and then the stream is turned around and the server gets to send as
much data is it wants. Once the stream has been turned around, there is no
going back. This is not a matter of a missing interface; it's the way the
protocol works.
So just write until you're done, then start reading (or call the End stub).
As soon as something tries to read data from the stream (either you call
rx_Read, or the stub does), any pending writes will be flushed and the
stream will be turned around automatically.
-- Jeffrey T. Hutzelman (N3NHS) <jhutz+@cmu.edu>
Sr. Research Systems Programmer
School of Computer Science - Research Computing Facility
Carnegie Mellon University - Pittsburgh, PA