SDL Wiki
(This is the documentation for SDL3, which is the current stable version. SDL2 was the previous version!)

SDL_ReadIO

Read from a data source.

Header File

Defined in <SDL3/SDL_iostream.h>

Syntax

size_t SDL_ReadIO(SDL_IOStream *context, void *ptr, size_t size);

Function Parameters

SDL_IOStream * context a pointer to an SDL_IOStream structure.
void * ptr a pointer to a buffer to read data into.
size_t size the number of bytes to read from the data source.

Return Value

(size_t) Returns the number of bytes read, or 0 on end of file or other failure; call SDL_GetError() for more information.

Remarks

This function reads up size bytes from the data source to the area pointed at by ptr. This function may read less bytes than requested. It will return zero when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF, or on error, and SDL_GetIOStatus() will return SDL_IO_STATUS_ERROR.

Version

This function is available since SDL 3.1.3.

See Also


CategoryAPI, CategoryAPIFunction, CategoryIOStream


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.