Prepare the data to send to the connector
331020
public function dataSet()
    {
        $base = $this->storeManager->getStore(0)->getBaseUrl();
        $modules = $this->_moduleList->getNames();

        foreach ($modules as $module) {
            if (strpos($module, self::EADESIGN) !== false) {
                $this->connect([
                    'url' => $base,
                    'version' => $this->moduleResource->getDbVersion($module),
                    'extension' => $module,
                    'mversion' => 2
                ]);
            }
        }

    }
935167
def send(self, data):
        """"""
        # send message
        _LOGGER.debug("send: " + data)
        self.socket.send(data.encode('ascii'))
        # sleep needed to prevent flooding the GC100 with sends
        sleep(.01)
1090358
private void prepareStreams(Socket socket) throws IOException {

        // Close any open streams if I'm being called because a new socket was
        // set to handle this transport.
        try {
            if (dataInputStream != null) {
                dataInputStream.close();
            }
            if (dataOutputStream != null) {
                dataOutputStream.close();
            }
        }
        catch (IOException x) {
            // Do nothing.
        }

        dataInputStream = new DataInputStream(new BufferedInputStream(socket.getInputStream()));
        dataOutputStream = new DataOutputStream(new BufferedOutputStream(socket.getOutputStream()));
    }
556990
def ready_to_send!
      identify_and_set_transfer_encoding
      parts.each do |part|
        part.transport_encoding = transport_encoding
        part.ready_to_send!
      end
      add_required_fields
    end
316816
protected function prepareImportData()
    {
        $this->initParentCategory();
        $this->setActiveField();

        $this->initPreviewImage();
        $this->initImageList();

        parent::prepareImportData();
    }
34144
def sendConnect(self, data):
        """"""
        # Imported dynamically - Not used if only one broker
        if self.backend == 'ZMQ':
            import zmq
            self.context = zmq.Context()
            self.socket = self.context.socket(zmq.DEALER)
            if sys.version_info < (3,):
                self.socket.setsockopt_string(zmq.IDENTITY, unicode('launcher'))
            else:
                self.socket.setsockopt_string(zmq.IDENTITY, 'launcher')
            self.socket.connect(
                "tcp://{hostname}:{port}".format(
                    port=self.brokerPort,
                    hostname = self.hostname
                )
            )
            self.socket.send_multipart([b"CONNECT",
                                        pickle.dumps(data,
                                                     pickle.HIGHEST_PROTOCOL)])
        else:
            # TODO
            pass
405048
def _send(self, data):
        """"""
        if not self._sock:
            self.connect()
        self._do_send(data)
726817
def sendto(self, data, addr):
        
        asyncio.ensure_future(self.__inner_protocol.send_data(data, addr))
975123
def send_data(self, data, delay=COMMAND_DELAY):
        

        time_since_last_send = time.time() - self._last_send
        delay = max(0, delay - time_since_last_send)
        time.sleep(delay)  # Ensure minim recommended delay since last send

        for item in data:
            data = bytes.fromhex(str(item.zfill(2)))
            try:
                self.sock.send(data)
            except ConnectionResetError as msg:
                _LOGGER.error("Error trying to connect to Russound controller. "
                              "Check that no other device or system is using the port that "
                              "you are trying to connect to. Try resetting the bridge you are using to connect.")
                _LOGGER.error(msg)
        self._last_send = time.time()
159948
def prepare(cls, value, length=0, position=0, is_last_data=True):
        
        hstruct = WriteLobHeader.header_struct
        lob_option_dataincluded = WriteLobHeader.LOB_OPTION_DATAINCLUDED if length > 0 else 0
        lob_option_lastdata = WriteLobHeader.LOB_OPTION_LASTDATA if is_last_data else 0
        options = lob_option_dataincluded | lob_option_lastdata
        pfield = hstruct.pack(cls.type_code, options, length, position)
        return pfield
433736
protected function sendData()
    {
        foreach ($this->values as $index => $data) {
            foreach ($data as $xy) {
                list($x, $y) = $xy;
                $this->sendCommand($x.' '.$y);
            }
            $this->sendCommand('e');
        }
    }
1116873
def _prepare_proxy(self, conn):
        
        conn.set_tunnel(self._proxy_host, self.port, self.proxy_headers)
        conn.connect()
806576
def prepare(self, data):
        
        result = {}

        if not self.fields:
            # No fields specified. Serialize everything.
            return data

        for fieldname, lookup in self.fields.items():
            if isinstance(lookup, SubPreparer):
                result[fieldname] = lookup.prepare(data)
            else:
                result[fieldname] = self.lookup_data(lookup, data)

        return result
128462
async def send_data(self):
        """"""
        self.connection._ensure_alive()
        conn = self.connection

        try:
            await self._open_file()
            with self._file_object:
                chunk_size = MAX_PACKET_LEN
                while True:
                    chunk = await self._file_read(chunk_size)
                    if not chunk:
                        break
                    # TODO: consider drain data
                    conn.write_packet(chunk)
        except asyncio.CancelledError:
            self.connection._close_on_cancel()
            raise
        finally:
            # send the empty packet to signify we are done sending data
            conn.write_packet(b"")
186528
protected function prepareImportData()
    {
        if (empty($this->arImportData)) {
            return;
        }

        foreach ($this->arImportData as $sKey => $sValue) {
            if (!is_string($sValue)) {
                continue;
            }

            $this->arImportData[$sKey] = trim($sValue);
        }
    }
1087228
protected function prepareProjectData(): void
  {
    parent::prepareProjectData();

    // Get file list form the project by fileset ID.
    $sources               = $this->getProject()->getReference($this->sourcesFilesetId);
    $this->sourceFileNames = $sources->getDirectoryScanner($this->getProject())->getIncludedFiles();
    $suc                   = ksort($this->sourceFileNames);
    if ($suc===false) $this->logError("ksort failed.");
  }
602187
def send_data(self, data):
        ''' 
        '''
        for frontend_data in data:
            serialized_data = self.serialize_data(frontend_data)
            if sys.version_info >= (3, 0):
                serialized_data = serialized_data.encode('utf-8')
            for actual_backend in self.backends:
                actual_backend[1].send(serialized_data)