DTBonjourDataChunk Class Reference
| Inherits from | NSObject |
| Declared in | DTBonjourDataChunk.h |
Overview
This class represents an object that is being transmitted as a chunk of data comprised of a header and the raw data.
Tasks
Creating Data Chunks
Getting Information
-
– isTransmissionComplete -
totalBytesproperty -
numberOfTransferredBytesproperty -
sequenceNumberproperty
Reading/Writing
Properties
numberOfTransferredBytes
Number of bytes that have been transferred already
@property (nonatomic, readonly) NSUInteger numberOfTransferredBytesDeclared In
DTBonjourDataChunk.hInstance Methods
decodedObject
Decodes the object contained in the received data.
- (id)decodedObjectDiscussion
Note: You should only call this method once transmission is complete.
See Also
Declared In
DTBonjourDataChunk.hinitForReading
Creates a data chunk meant for receiving.
- (id)initForReadingDeclared In
DTBonjourDataChunk.hinitWithObject:encoding:error:
Creates a data chunk meant for sending.
- (id)initWithObject:(id)object encoding:(DTBonjourDataConnectionContentType)encoding error:(NSError **)errorParameters
- object
An object to be encoded and transmitted
- encoding
The transport encoding to be used for encoding the object
- error
An optional error output parameter for when the object cannot be encoded
Declared In
DTBonjourDataChunk.hisTransmissionComplete
YES if all bytes have been written/read
- (BOOL)isTransmissionCompleteReturn Value
YES if all bytes have been written/read
Declared In
DTBonjourDataChunk.hreadFromInputStream:
Reads from the input stream and initializes the header and payload as the necessary data becomes available.
- (NSInteger)readFromInputStream:(NSInputStream *)streamParameters
- stream
The input stream to read from
Return Value
The number of bytes read. -1 means that there was an error.
Declared In
DTBonjourDataChunk.hwriteToOutputStream:
Writes the as many bytes to the output stream as it would accept
- (NSInteger)writeToOutputStream:(NSOutputStream *)streamParameters
- stream
The output stream to write to
Return Value
The number of bytes written. -1 means that there was an error.
Declared In
DTBonjourDataChunk.h