mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
36 lines
660 B
Mathematica
36 lines
660 B
Mathematica
|
// Copyright © 2016 Open Whisper Systems. All rights reserved.
|
||
|
|
||
|
#import "OWSChunkedOutputStream.h"
|
||
|
#import <ProtocolBuffers/CodedOutputStream.h>
|
||
|
|
||
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
||
|
@implementation OWSChunkedOutputStream
|
||
|
|
||
|
+ (instancetype)streamWithOutputStream:(NSOutputStream *)output
|
||
|
{
|
||
|
return [[self alloc] initWithOutputStream:output];
|
||
|
}
|
||
|
|
||
|
- (instancetype)initWithOutputStream:(NSOutputStream *)outputStream
|
||
|
{
|
||
|
self = [super init];
|
||
|
if (!self) {
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
_delegateStream = [PBCodedOutputStream streamWithOutputStream:outputStream];
|
||
|
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
- (void)flush
|
||
|
{
|
||
|
[self.delegateStream flush];
|
||
|
}
|
||
|
|
||
|
|
||
|
@end
|
||
|
|
||
|
NS_ASSUME_NONNULL_END
|