Generally this won't need very strong knowledge of an event loop; for example with Twisted you should just be able to pass "transport.write" as this argument.