mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
(Network Stream) Add function netstream_eof (#14335)
This commit is contained in:
parent
30977a2603
commit
e1a139ec0f
@ -108,6 +108,17 @@ bool netstream_truncate(netstream_t *stream, size_t used);
|
||||
*/
|
||||
void netstream_data(netstream_t *stream, void **data, size_t *len);
|
||||
|
||||
/**
|
||||
* netstream_eof:
|
||||
*
|
||||
* @stream : Pointer to a network stream object.
|
||||
*
|
||||
* Checks whether the network stream is at EOF or not.
|
||||
*
|
||||
* Returns: true if the stream is at EOF, false otherwise.
|
||||
*/
|
||||
bool netstream_eof(netstream_t *stream);
|
||||
|
||||
/**
|
||||
* netstream_tell:
|
||||
*
|
||||
|
@ -89,6 +89,11 @@ void netstream_data(netstream_t *stream, void **data, size_t *len)
|
||||
*len = stream->used;
|
||||
}
|
||||
|
||||
bool netstream_eof(netstream_t *stream)
|
||||
{
|
||||
return stream->pos >= stream->used;
|
||||
}
|
||||
|
||||
size_t netstream_tell(netstream_t *stream)
|
||||
{
|
||||
return stream->pos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user