Guardtime KSI c SDK
Loading...
Searching...
No Matches
io.h File Reference
#include "ksi.h"

Go to the source code of this file.

Functions

int KSI_IO_readSocket (int fd, void *buf, size_t size, size_t *count)
int KSI_IO_readFile (FILE *f, void *buf, size_t size, size_t *count)

Function Documentation

◆ KSI_IO_readFile()

int KSI_IO_readFile ( FILE * f,
void * buf,
size_t size,
size_t * count )

Reads size bytes from the file stream.

Parameters
[in]fFile descriptor
[in]bufPointer to pre-allocated buffer.
[in]sizeSize of buf.
[out]countOutput of read bytes.
Returns
The method will return KSI_OK when no error occurred.

◆ KSI_IO_readSocket()

int KSI_IO_readSocket ( int fd,
void * buf,
size_t size,
size_t * count )

Reads size bytes from the socket.

Parameters
[in]fdSocket descriptor
[in]bufPointer to pre-allocated buffer.
[in]sizeSize of buf.
[out]countOutput of read bytes.
Returns
The method will return KSI_OK when no error occurred.