SwiftSocket icon indicating copy to clipboard operation
SwiftSocket copied to clipboard

What can I do when length of received data is more than 1024

Open XXIrene opened this issue 8 years ago • 1 comments

Hello everybody! Is there any method I can use to handle the problem that the length of received data is more than 1024?

Thanks for your response~

XXIrene avatar Dec 25 '17 07:12 XXIrene

It's the same client.read method, you pass the expected length of the data, check this line.. So you'll do something like this:

var data = client.read(1024 * 100) // to receive 100 kb for example.

mmgrt avatar Dec 26 '17 07:12 mmgrt