The AsyncReadPacket encompasses the instructions for any given read.
More...
List of all members.
Detailed Description
The AsyncReadPacket encompasses the instructions for any given read.
The content of a read packet allows the code to determine if we're:
- reading to a certain length
- reading to a certain separator
- or simply reading the first chunk of available data
Member Function Documentation
- (id) initWithData: |
|
(NSMutableData *) |
d |
startOffset: |
|
(NSUInteger) |
s |
maxLength: |
|
(NSUInteger) |
m |
timeout: |
|
(NSTimeInterval) |
t |
readLength: |
|
(NSUInteger) |
l |
terminator: |
|
(NSData *) |
e |
tag: |
|
(long) |
i |
|
|
| |
- (NSUInteger) prebufferReadLengthForTerm |
|
|
|
Assuming pre-buffering is enabled, returns the amount of data that can be read without going over the maxLength.
- (NSUInteger) readLengthForNonTerm |
|
|
|
For read packets without a set terminator, returns the safe length of data that can be read without exceeding the maxLength, or forcing a resize of the buffer if at all possible.
- (NSUInteger) readLengthForTerm |
|
|
|
For read packets with a set terminator, returns the safe length of data that can be read without going over a terminator, or the maxLength, or forcing a resize of the buffer if at all possible.
It is assumed the terminator has not already been read.
- (NSUInteger) readLengthForTermWithPreBuffer: |
|
(NSData *) |
preBuffer |
found: |
|
(BOOL *) |
foundPtr |
|
|
| |
For read packets with a set terminator, returns the safe length of data that can be read from the given preBuffer, without going over a terminator or the maxLength.
It is assumed the terminator has not already been read.
- (NSInteger) searchForTermAfterPreBuffering: |
|
(NSUInteger) |
numBytes |
|
For read packets with a set terminator, scans the packet buffer for the term.
It is assumed the terminator had not been fully read prior to the new bytes.
If the term is found, the number of excess bytes after the term are returned. If the term is not found, this method will return -1.
Note: A return value of zero means the term was found at the very end.
Member Data Documentation
The documentation for this class was generated from the following file:
- wiselib.testing/external_interface/iphone/AsyncSocket/AsyncSocket.m