blob: 1fa04f4c02c91ac24ec3ff8a5fa4aad120a57a9f [file] [log] [blame]
Mark Slee7e9eea42007-09-10 21:00:23 +00001@protocol TTransport <NSObject>
2
3 /**
Mark Slee33a7d892007-09-14 19:44:30 +00004 * Guarantees that all of len bytes are read
Mark Slee7e9eea42007-09-10 21:00:23 +00005 *
Mark Slee33a7d892007-09-14 19:44:30 +00006 * @param buf Buffer to read into
7 * @param off Index in buffer to start storing bytes at
Mark Slee7e9eea42007-09-10 21:00:23 +00008 * @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