Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Early termination of read requests

The member function Read() normally completes when one of the following conditions is true, depending on the variant called and the actual data that comes in to the port:

We have seen that a port can be configured to extend the conditions under which a read request completes, but even this is not efficient enough when a program needs to respond quickly to the content of the data that is sent. For example, if we need to process variable length lines of text, we really need our read request to complete as soon as the line end is detected. However, the last thing we want to do in this situation is to start issuing read requests for every single character. Clearly, we need to be able to configure a port so that read requests can complete on the basis of the data that is actually received.

Cases like this are catered for by allowing us to specify up to four characters as terminators when we configure a port.