Add NetworkError() function
Add NetworkError() function
Currently, when checking the return value of ReceiveNetworkData() and similar, we get -1 if no more data can be read. However, this could be for any number of reasons, from that being all the data there is to a wouldblock. It's currently impossible to determine this with the Network library. mk-soft wrote the amazing NetworkTCP module, and it gives you different statuses when you receive data. My proposal for the PB stdlib, to avoid breaking old code, is a NetworkError() function, that could return e.g. #PB_Network_EndOfData, #PB_Network_WouldBlock, etc.
Re: Add NetworkError() function
A GetNetworkError would be nice. I have something like this for Window and macOS. Only with Linux unfortunately only for the C-backend.
There is no such thing as EndOfData or WouldBlock with TCP/IP.
This has to be programmed in the application layer itself as with my module or as with Modbus/TCP.
There is no such thing as EndOfData or WouldBlock with TCP/IP.
This has to be programmed in the application layer itself as with my module or as with Modbus/TCP.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive