I am using the socket interface provided by the ioLibrary_Driver in a non-blocking mode. I have a small problem which I can resolve by changing the code in the library but was wondering if there is another way to solve this.
- I call send to send some data via a TCP socket.
- I receive a SEND_OK interrupt which I use to notify the caller that the data has been sent successfully.
- I then clear this interrupt as I am done with it.
- I call send again to send more data via the same TCP socket.
- I get a SOCK_BUSY status returned as the sock_is_sending bit corresponding to my socket is set. This bit would be cleared during the call to send if the Sn_IR_SENDOK was set in the sn_IR register but I have already cleared this interrupt so this bit is not set.
My workaround involves a call that clear the sock_is_sending bit corresponding to my socket when the SEND_OK interrupt has happened. This requires modifying the library and I rather not do that. Is there another way?