code: def _add_ubridge_connection(self, nio, adapter_number):
          
  
          vnet = self._get_vnet(adapter_number)
          yield from self._ubridge_send("bridge create {name}".format(name=vnet))
          vmnet_interface = os.path.basename(self._vmx_pairs[vnet])
  
          if sys.platform.startswith("darwin"):
              # special case on OSX, we cannot bind VMnet interfaces using the libpcap
              yield from self._ubridge_send('bridge add_nio_fusion_vmnet {name} "{interface}"'.format(name=vnet, interface=vmnet_interface))
          else:
              block_host_traffic = self.manager.config.get_section_config("VMware").getboolean("block_host_traffic", False)
              yield from self._add_ubridge_ethernet_connection(vnet, vmnet_interface, block_host_traffic)
  
          if isinstance(nio, NIOUDP):
              yield from self._ubridge_send('bridge add_nio_udp {name} {lport} {rhost} {rport}'.format(name=vnet,
                                                                                                       lport=nio.lport,
                                                                                                       rhost=nio.rhost,
                                                                                                       rport=nio.rport))
  
          if nio.capturing:
              yield from self._ubridge_send('bridge start_capture {name} "{pcap_file}"'.format(name=vnet, pcap_file=nio.pcap_output_file))
  
          yield from self._ubridge_send('bridge start {name}'.format(name=vnet))
          yield from self._ubridge_apply_filters(vnet, nio.filters)
docs: Creates a connection in uBridge.
  
          :param nio: NIO instance
          :param adapter_number: adapter number