Can someone help me?. I'm trying to write a program that communicates with a Casio PDA. I…
jordi wrote 11 lines
You probably have to check it byte by byte, yes. You should completely separate the receiving and the processing of the packets, just like the compiler separates the scanner and the reading of the pascal source code. If the scanner needs a new character, it just calls a function called nextchar() (or something like that) which returns the next character. This procedure checks whether the next character is already in the memory buffer and if not, reloads the memory buffer with the next part of the file.
You can do something similar, but with nextchar() waiting for more input from the network.
Jonas
