skirwan / clan-lord-client-issues

Bug tracking for Clieunk
2 stars 0 forks source link

SKDataReader should match Swift unsafe-callback style #170

Open skirwan opened 3 years ago

skirwan commented 3 years ago

Current design runs the risk of data copying. Since reader instances never escape their calling scope we could potentially use unsafe pointers and sped things up with something like data.read { reader in ... }.

skirwan commented 3 years ago

Could also allow a reader.limitLength(to: ) { reader in ... } and make some of the UDP reliable stream code cleaner.