Guardtime KSI c SDK
Functions
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

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.
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.