I am wondering how I can do partial socket receive/read calls, just like normal TCP sockets.
Let's say I connect to a server and then write some data. I then make a receive call, and have a buffer of 100 bytes. With normal sockets like on a PC, I could say, receive the 100 bytes, and it would give me up to 100 bytes maximum. I could then go do something else, come back in a little while and as long as the connection was still open, receive some more data into my buffer. This is expected, and is similar to the way you read a file.
On the WINC1500 however, it will receive the 100 bytes, and then I will keep getting successive interrupts as it receives the next 100 bytes into the same buffer and so on until the entire message is received. Is there an easy way to make this stop after my first n number of bytes? Maybe it's just as simple as somehow aborting the receive call after the first interrupt occurs. I can dig into it more but thought I would ask here first before going too far.