Index: benchmark/io/http/protocol.cfa
===================================================================
--- benchmark/io/http/protocol.cfa	(revision 7f389a5cebf89e197d496b8721d40a9431238077)
+++ benchmark/io/http/protocol.cfa	(revision 5db836e74259bdb0b92bdce62919db57fd1efd5b)
@@ -1,4 +1,8 @@
 #include "protocol.hfa"
 
+#define _GNU_SOURCE
+extern "C" {
+	#include <fcntl.h>
+}
 #include <iofwd.hfa>
 
@@ -83,2 +87,27 @@
 	return [OK200, false, it, end - it];
 }
+
+void sendfile( int pipe[2], int fd, int ans_fd, size_t count ) {
+	off_t offset = 0;
+	ssize_t ret;
+	SPLICE1: while(count > 0) {
+		ret = cfa_splice(ans_fd, &offset, pipe[1], 0p, count, SPLICE_F_MOVE | SPLICE_F_MORE);
+		if( ret < 0 ) {
+			if( errno != EAGAIN && errno != EWOULDBLOCK) continue SPLICE1;
+			abort( "splice [0] error: (%d) %s\n", (int)errno, strerror(errno) );
+		}
+
+		count -= ret;
+		offset += ret;
+		size_t in_pipe = ret;
+		SPLICE2: while(in_pipe > 0) {
+			ret = cfa_splice(pipe[0], 0p, fd, 0p, in_pipe, SPLICE_F_MOVE | SPLICE_F_MORE);
+			if( ret < 0 ) {
+				if( errno != EAGAIN && errno != EWOULDBLOCK) continue SPLICE2;
+				abort( "splice [1] error: (%d) %s\n", (int)errno, strerror(errno) );
+			}
+			in_pipe -= ret;
+		}
+
+	}
+}
Index: benchmark/io/http/protocol.hfa
===================================================================
--- benchmark/io/http/protocol.hfa	(revision 7f389a5cebf89e197d496b8721d40a9431238077)
+++ benchmark/io/http/protocol.hfa	(revision 5db836e74259bdb0b92bdce62919db57fd1efd5b)
@@ -14,2 +14,4 @@
 
 [HttpCode code, bool closed, * const char file, size_t len] http_read(int fd, []char buffer, size_t len);
+
+void sendfile( int pipe[2], int fd, int ans_fd, size_t count );
Index: benchmark/io/http/worker.cfa
===================================================================
--- benchmark/io/http/worker.cfa	(revision 7f389a5cebf89e197d496b8721d40a9431238077)
+++ benchmark/io/http/worker.cfa	(revision 5db836e74259bdb0b92bdce62919db57fd1efd5b)
@@ -1,15 +1,8 @@
 #include "worker.hfa"
-
-#define __USE_GNU
 
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
-extern "C" {
-	#include <fcntl.h>
-	#include <sys/socket.h>
-	#include <sys/types.h>
-	#include <netinet/in.h>
-}
+#include <unistd.h>
 
 #include <iofwd.hfa>
@@ -32,29 +25,4 @@
 // Worker Thread
 //=============================================================================================
-void sendfile( Worker & this, int fd, int ans_fd, size_t count ) {
-	off_t offset = 0;
-	ssize_t ret;
-	SPLICE1: while(count > 0) {
-		ret = cfa_splice(ans_fd, &offset, this.pipe[1], 0p, count, SPLICE_F_MOVE | SPLICE_F_MORE);
-		if( ret < 0 ) {
-			if( errno != EAGAIN && errno != EWOULDBLOCK) continue SPLICE1;
-			abort( "splice [0] error: (%d) %s\n", (int)errno, strerror(errno) );
-		}
-
-		count -= ret;
-		offset += ret;
-		size_t in_pipe = ret;
-		SPLICE2: while(in_pipe > 0) {
-			ret = cfa_splice(this.pipe[0], 0p, fd, 0p, in_pipe, SPLICE_F_MOVE | SPLICE_F_MORE);
-			if( ret < 0 ) {
-				if( errno != EAGAIN && errno != EWOULDBLOCK) continue SPLICE2;
-				abort( "splice [1] error: (%d) %s\n", (int)errno, strerror(errno) );
-			}
-			in_pipe -= ret;
-		}
-
-	}
-}
-
 void ?{}( Worker & this ) {
 	((thread&)this){ "Server Worker Thread", *options.the_cluster };
@@ -111,5 +79,5 @@
 
 			// Send the desired file
-			sendfile( this, fd, ans_fd, count);
+			sendfile( this.pipe, fd, ans_fd, count);
 
 			printf("File sent\n");
