and the events WIP_CEV_WRITE are not fired when there is 1 byte free in the buffer (for test purpose). WIP_CEV_READ are not fired when 1 byte is received…I don’t understand why…
WIP_CEV_READ and WIP_CEV_WRITE will fire if you open the socket and data arrives first time.
The other scenario, when you read or write more data than the socket can handle at that moment.
For example, in your incoming data processing routine when you receive the WIP_CEV_READ (first time you will) after you have red all available bytes just read additional byte(s) with wip_read() function. The WIP_CEV_READ event will come again when data arrives. In case of write, if the wip_write() function returns less value than the buffer length you provided, the WIP_CEV_WRITE will fire when you can send more data.
For the WIP_CEV_READ event, I don’t press enter in netcat, so the data where not send…I receive the event when it is correct.
For the WIP_CEV_WRITE event, I configured the wip_TCPClientCreateOpts with WIP_COPT_SND_LOWAT, 1 so according to the documentation, I must receive a WIP_CEV_WRITE event each 1 new byte free in the send buffer.
I receive this event only once at the connection to the socket…
If I want to know how much bytes are free in the buffer, I make polling on the WIP_COPT_NWRITE parameter with wip_getOpts.
"In case of write, if the wip_write() function returns less value than the buffer length you provided, the WIP_CEV_WRITE will fire when you can send more data. " It’s normal that I not receive this event because I send never more data at one time that the wip can handle… I do that like i did it when I used edlib… hmmm some philosophic choices