Removing 'in_sock' and 'out_sock' and reordering send/recv