Changeset 10:9cf218bd97ba in xplcommon for src/xplcommon/posix/BufferedWaitable.h
- Timestamp:
- 12/29/12 09:02:58 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/posix/BufferedWaitable.h
r6 r10 103 103 protected: 104 104 /** 105 * Read using the file descriptor into the given buffer. 105 * Read using the file descriptor at most the given number of 106 * bytes into the given buffer. 107 * 108 * This default implementation uses the read(2) function for 109 * reading. 110 * 111 * @return the number of bytes read (0 in case of end-of-file or 112 * when the connection is closed), -1 on error. 106 113 */ 107 virtual ssize_t read(void* dest, size_t length) = 0;114 virtual ssize_t read(void* dest, size_t length); 108 115 109 116 /** 110 * Write using the file descriptor from the given buffer. 117 * Write using the file descriptor the given number of bytes from 118 * the given buffer. 119 * 120 * This default implementation uses the write(2) function for 121 * writing. 122 * 123 * @return the number of bytes written, or -1 on error. 111 124 */ 112 virtual ssize_t write(const void* src, size_t length) = 0;125 virtual ssize_t write(const void* src, size_t length); 113 126 114 127 /**
Note:
See TracChangeset
for help on using the changeset viewer.