mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
660 B
Objective-C
36 lines
660 B
Objective-C
// 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
|