On 4/5/07, Coding Horse <[EMAIL PROTECTED]> wrote:
Hi, Trustin, Could you please explain what will happen if NOT_OK is returned in decodable()? Is it the recommended way to check protocol header and if a violation detected return NOT_OK in decodable()? Thx.
Then it will be excluded from the candidate MessageDecoder list. That's all. Decodable() is just a predicate, so we can simply return NOT_OK if protocol violation is detected. You will have to program decodable() as simple as possible so it doesn't take long time to decide it can be decoded by itself or not. Any further detailed check should be in decode(). Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
