Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, if you called one of the read or write methods, the read/…
…write could possibly start AND finish before the method even returned. E.g.: [asyncSocket readDataToLength:15 timeout:5 tag:10]; // Read has already finished, and invoked your delegate method! state = READING; // Oops! This isn't what people generally suspect, and it runs a bit counter to the asynchronous idea. Thus this has been changed. Calling a read or write method will no longer finish prior to the method returning. The read/write is guaranteed to finish until at least the next invocation of the run loop.
- Loading branch information
1 parent
e5752cd
commit be7716f
Showing
2 changed files
with
105 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters