Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Enables to have an Buffered output stream, linked to to an input stream... this is useful when testing, or when you need to simulate an input stream, that is refilled with local data

License

Notifications You must be signed in to change notification settings

timelyraining/BufferOutputStreamToInputStream

Open more actions menu
 
 

Repository files navigation

BufferOutputStreamToInputStream

Enables to have an Buffered output stream, linked to to an input stream... this is useful when testing, or when you need to simulate an input stream, that is refilled with local data on an event basis

// initialize
self.bufferWriter = [[BufferOutputStreamToInputStream alloc] init];
[self.bufferWriter openOutputStream];

// later you want to set the delegate of the inputStream and shedule it in runloop
// remember, you are responsible for the inputStream, the outputStream is taken care off;)
self.bufferWriter.inputStream.delegate = self;
[self.bufferWriter.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
[self.bufferWriter.inputStream open]

// fill with data when desired on some event      
[self.bufferWriter addDataToBuffer:someData];

About

Enables to have an Buffered output stream, linked to to an input stream... this is useful when testing, or when you need to simulate an input stream, that is refilled with local data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.