/*
 * socketutil.h
 *
 */

#ifndef SOCKETUTIL_H_
#define SOCKETUTIL_H_

#ifdef ENABLE_JNI_FOR_ANDROID
#include <jni.h>
#endif // ENABLE_JNI_FOR_ANDROID
#include <sys/types.h>
#include <sys/socket.h>

#ifdef __cplusplus
extern "C" {
#endif

extern ssize_t readsock(const int fd, const void *buf, const size_t len, timeval *timeout, int *isTimeoutOccur);
extern ssize_t writesock(const int fd, const void *buf, const size_t len, timeval *timeout, int *isTimeoutOccur);

#ifdef __cplusplus
}
#endif

#endif /* SOCKETUTIL_H_ */
