Merge toplev into conn, and handle send() errors properly