diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2010-07-09 12:32:17 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2010-07-09 12:32:17 +0200 |
commit | 6c027b4de25a529908be895e7ff19236f4002a57 (patch) | |
tree | f70d3a400bbb9ba8a83e9d4ffcaa4b6e367fc8bb /u8_read.c | |
download | crypto-6c027b4de25a529908be895e7ff19236f4002a57.zip crypto-6c027b4de25a529908be895e7ff19236f4002a57.tar.gz |
initial commit, resurrect one of my realy old projects
Diffstat (limited to 'u8_read.c')
-rw-r--r-- | u8_read.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/u8_read.c b/u8_read.c new file mode 100644 index 0000000..71e3ad7 --- /dev/null +++ b/u8_read.c @@ -0,0 +1,14 @@ +#include <sys/types.h> +#include <sys/socket.h> +#include <unistd.h> +#include "uint.h" + +int u8_unix_read(int fd,u8 *buf,u32 len) +{ + return read(fd,(char*)buf,(int)len); +} + +int u8_tcp_read(int fd,u8 *buf, u32 len) +{ + return recv(fd, (char*)buf,(int)len,0); +} |