SDL_net icon indicating copy to clipboard operation
SDL_net copied to clipboard

Documentation issues...

Open icculus opened this issue 2 years ago • 0 comments

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.

icculus avatar Jun 15 '22 05:06 icculus