iosvb.netsilverlighttcpcocoaasyncsocket

CocoaAsyncSocket set the buffer size


I have written a VB.NET server that communicates with a silverlight client and a iOS client (using CocoaAsyncSocket). I'm sending and receiving JSON data, and pdf documents encoded as base64 strings. When receiving encoded pdf documents on the client side I have some performance issues, it was easily fixed in the silverlight client by adjusting the ReceiveBufferSize, and setting the SendBufferSize on the server (both currently set to 65536). But on iOS client I can't find any where to set the buffer size. Receiving a document about 6MB in silverlight takes 3-4 sec, and on iOS 25-30 sec.


Solution

  • I have found the problem, it had nothing to do with the buffer size (CocoaAsyncSocket seams to handle that by it self). I had a NSLog writing out all strings, so it was the output to the console that slowed everything down. I thought that all NSLog call where ignored when building the app for release, but that's not the case, it still prints everything out.