summaryrefslogtreecommitdiffstats
path: root/buffer_write.c
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2010-07-09 12:32:17 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2010-07-09 12:32:17 +0200
commit6c027b4de25a529908be895e7ff19236f4002a57 (patch)
treef70d3a400bbb9ba8a83e9d4ffcaa4b6e367fc8bb /buffer_write.c
downloadcrypto-6c027b4de25a529908be895e7ff19236f4002a57.zip
crypto-6c027b4de25a529908be895e7ff19236f4002a57.tar.gz
initial commit, resurrect one of my realy old projects
Diffstat (limited to 'buffer_write.c')
-rw-r--r--buffer_write.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/buffer_write.c b/buffer_write.c
new file mode 100644
index 0000000..1b71086
--- /dev/null
+++ b/buffer_write.c
@@ -0,0 +1,14 @@
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <unistd.h>
+#include "buffer.h"
+
+int buffer_unix_write(int fd,const char *buf,unsigned int len)
+{
+ return write(fd,buf,len);
+}
+
+int buffer_tcp_write(int fd, const char *buf, unsigned int len)
+{
+ return send(fd, buf,len,0);
+}