Class ChunkedStream
Represents a stream that will flush after a certain size or time threshold.
Implements
Inherited Members
Namespace: Unity.Simulation
Assembly: solution.dll
Syntax
public class ChunkedStream : IDisposable
Constructors
| Name | Description |
|---|---|
| ChunkedStream(int, float, Func<AsyncRequest<object>, Result>) | Constructs a stream object. |
Fields
| Name | Description |
|---|---|
| kDefaultBufferSize | The default stream buffer size. |
| kDefaultMaxSecondsElapsed | The default flush time in seconds. |
Properties
| Name | Description |
|---|---|
| functor | Callback functor to call when flush occurs. Accumulated data thus far is passed to functor. |
Methods
| Name | Description |
|---|---|
| Append(byte[]) | Append the data to the byte buffer |
| Dispose() | Disposes of the stream and removes it from Tick. |
| Flush(bool) | Write the data in the buffer to the file system. |