- Timestamp:
- 12/07/07 19:27:20 (13 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde
r80 r81 202 202 203 203 int readMatch(char *stringToMatch) { 204 /* 205 206 Routine to read and match bytes received. 207 208 (Essentially strcmp replacement without requiring a large receive buffer.) 209 210 NOTE: Failed matches drop all bytes read so far. (i.e. you can't check for 211 a bunch of possible matches from the same starting position). 212 TODO: Fix this. 213 214 Note: This blocks if there isn't enough data in the rx buffer. 215 216 */ 204 217 205 218 while (getSn_RX_RSR(testSocket) < strlen(stringToMatch)) { … … 208 221 } 209 222 223 // TODO: Do fancy string-matching techniques to avoid reading the whole string 224 // on non-matches. :-) 210 225 for (int currCharIdx = 0; currCharIdx < strlen(stringToMatch); currCharIdx++) { 211 226 if (readByte() != stringToMatch[currCharIdx]) {