Mark Slee | 7e9eea4 | 2007-09-10 21:00:23 +0000 | [diff] [blame] | 1 | @protocol TTransport <NSObject> |
| 2 | |
| 3 | /** |
Mark Slee | 33a7d89 | 2007-09-14 19:44:30 +0000 | [diff] [blame] | 4 | * Guarantees that all of len bytes are read |
Mark Slee | 7e9eea4 | 2007-09-10 21:00:23 +0000 | [diff] [blame] | 5 | * |
Mark Slee | 33a7d89 | 2007-09-14 19:44:30 +0000 | [diff] [blame] | 6 | * @param buf Buffer to read into |
| 7 | * @param off Index in buffer to start storing bytes at |
Mark Slee | 7e9eea4 | 2007-09-10 21:00:23 +0000 | [diff] [blame] | 8 | * @param len Maximum number of bytes to read |
| 9 | * @return The number of bytes actually read, which must be equal to len |
| 10 | * @throws TTransportException if there was an error reading data |
| 11 | */ |
| 12 | - (int) readAll: (uint8_t *) buf offset: (int) off length: (int) len; |
| 13 | |
| 14 | - (void) write: (const uint8_t *) data offset: (unsigned int) offset length: (unsigned int) length; |
| 15 | |
| 16 | - (void) flush; |
| 17 | @end |