1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include "uint.h" int u8_unix_write(int fd, u8 *buf, u32 len) { return write(fd,(char*)buf,(int)len); } int u8_tcp_write(int fd, u8 *buf, u32 len) { return send(fd, (char*)buf,(int)len,0); }