On Wed, 23 Jul 2014 20:54:04 GMT, Etienne Cimon wrote:

A TCPConnection is a task-owned resource, if you need to use the resource you'll have to do task-messaging which requires some stream utilities (see vibe.stream.*). For this purpose, I think a task pipe would be what you're looking for.

Thanks, that almost works, now I just need that copying in the other direction too. Perhaps you can tell whats wrong with my original code. Its something I'd normally use Go or my own event based io in D but I'm trying to use vibed.
`
runTask(() {

ubyte[8192] buf;
logInfo("We're here");
while (true) {
	yield();
	try {
		conn.read(buf);
	} catch (Exception e) {
		logWarn("Source connection dropped read! ", e);
		break;
	}
	try {
		remoteconn.write(buf);
	} catch (Exception e) {
		logWarn("Sink connection dropped write! ", e);
		break;
	}
}

});
ubyte[8192] buf;
while (true) {

try {
	remoteconn.read(buf);
} catch (Exception e) {
	logWarn("Sink connection dropped read! ", e);
	break;
}
try {
	conn.write(buf);
} catch (Exception e) {
	logWarn("Source connection dropped write! ", e);
	break;
}

}
`