def create_write_socket(self, on_connected):
        write_sock = socket.socket()
        write_sock.setblocking(0)
        err = write_sock.connect_ex(self.listen_addr)
        # NOTE we get errno.EWOULDBLOCK 10035 on Windows
        self.assertIn(err, (errno.EINPROGRESS, errno.EWOULDBLOCK))
        fd_ = self.save_sock(write_sock)
        self.ioloop.add_handler(fd_, on_connected, WRITE)
        return write_sock
Called when the right mouse button is clicked on the tree.
dataset/ETHPy150Open pika/pika/tests/unit/select_connection_ioloop_tests.py/IOLoopSocketBaseSelect.create_write_socket--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/viewer/tree_viewer.py/TreeViewer._on_right_down