I hope someone can help me out. I have two applications (one server, one client). The client sends an image to the server via a socket connection.
Everything works fine but I have one question. Once the server receives the image packages, I want the server to send back the bytes received to the client. The problem is, that NSStreamEventHasSpaceAvailable on the server does not get called until the full image is received. After the image is received, NSStreamEventHasSpaceAvailable gets called and it sends the bytes received data (they all have been added to an NSMutableData).
I, however, need this to get send the same time. I was thinking to create a second connection just to handle this transfer but not sure if this is good practice.
Any help is truly appreciated.