Write queue after connect windows

I feel like callback is the right solution here, because with your approach we are scattering the implementation details everywhere.

This way we have the logic right where it belongs, in pipe.c and tcp.c