SDL_net
SDL_net copied to clipboard
Documentation issues...
This comment from https://discourse.libsdl.org/t/sdl2-net-misleading-documentation/37036 ...
As far as I can see the ‘official’ home page for SDL_net 2.0 is here, but if you then follow the link to the documentation what you get is the documentation for SDL_net 1.2.7. Although much of this is probably relevant to 2.0 as well, it is significantly misleading.
For example in the documentation of SDLNet_TCP_Recv it states “Receive data of exactly length maxlen bytes… Unless there is an error, or the connection is closed, the buffer will read maxlen bytes”. This is wrong: the function may well read fewer than maxlen bytes.
The correct description can be found in the source code: “Receive up to ‘maxlen’ bytes of data over the non-server socket ‘sock’, and store them in the buffer pointed to by ‘data’. This function returns the actual amount of data received”.
Please correct the documentation.