Class Methods | List of all members
GRXBufferedPipe Class Reference

#import <GRXBufferedPipe.h>

Inheritance diagram for GRXBufferedPipe:
Inheritance graph
[legend]

Class Methods

(instancetype) + pipe
 
- Class Methods inherited from GRXWriter
(instancetype) + emptyWriter
 
(instancetype) + writerWithContainer:
 
(instancetype) + writerWithEnumerator:
 
(instancetype) + writerWithError:
 
(instancetype) + writerWithValue:
 
(instancetype) + writerWithValueSupplier:
 

Additional Inherited Members

- Instance Methods inherited from GRXWriter
(void) - finishWithError:
 
(GRXWriter *) - map:
 
(void) - startWithWriteable:
 
- Instance Methods inherited from <GRXWriteable>
(void) - writesFinishedWithError:
 
(void) - writeValue:
 
- Properties inherited from GRXWriter
GRXWriterState state
 

Detailed Description

A buffered pipe is a Writer that also acts as a Writeable. Once it is started, whatever values are written into it (via -writeValue:) will be propagated immediately, unless flow control prevents it. If it is throttled and keeps receiving values, as well as if it receives values before being started, it will buffer them and propagate them in order as soon as its state becomes Started. If it receives an end of stream (via -writesFinishedWithError:), it will buffer the EOS after the last buffered value and issue it to the writeable after all buffered values are issued.

Beware that a pipe of this type can't prevent receiving more values when it is paused (for example if used to write data to a congested network connection). Because in such situations the pipe will keep buffering all data written to it, your application could run out of memory and crash. If you want to react to flow control signals to prevent that, instead of using this class you can implement an object that conforms to GRXWriter.

Thread-safety: the methods of this class are thread-safe.

Definition at line 41 of file GRXBufferedPipe.h.

Method Documentation

◆ pipe

+ (instancetype) pipe

Convenience constructor.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:46