Add tests
Simplify return code from send functions
tests: fd passing