mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
ccb4a88742
git remote add ssk ../SignalServiceKit git remote update git merge -s ours --allow-unrelated-histories --no-commit ssk/master git read-tree --prefix=SignalServiceKit -u ssk/master git commit
35 lines
660 B
Objective-C
35 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
|