cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/network/switches/AbstractSwitch.java
private void forwardPacketsToHosts() {
        for (final NetworkHost host : packetToHostMap.keySet()) {
            final List<HostPacket> packetList = getHostPacketList(host);
            for (final HostPacket pkt: packetList) {
                final double delay = networkDelayForPacketTransmission(pkt, downlinkBandwidth, packetList);
                this.send(getId(), delay, CloudSimTags.NETWORK_EVENT_HOST, pkt);
            }
            packetList.clear();
        }
    }
/**
     * Gets the list of packets to be sent to each Host
     * and forward them.
     *
     * @see #packetToHostMap
     */
Gets the list of packets to be sent to each Host
and forward them.


Gets the list of packets to be sent to each Host and forward them .
private void forwardPacketsToHosts() {
        for (final NetworkHost host : packetToHostMap.keySet()) {
            final List<HostPacket> packetList = getHostPacketList(host);
            for (final HostPacket pkt: packetList) {
                final double delay = networkDelayForPacketTransmission(pkt, downlinkBandwidth, packetList);
                this.send(getId(), delay, CloudSimTags.NETWORK_EVENT_HOST, pkt);
            }
            packetList.clear();
        }
    }
private void forwardPacketsToHosts ( ) { for ( final NetworkHost host : packetToHostMap . keySet ( ) ) { final List < HostPacket > packetList = getHostPacketList ( host ) ; for ( final HostPacket pkt : packetList ) { final double delay = networkDelayForPacketTransmission ( pkt , downlinkBandwidth , packetList ) ; this . send ( getId ( ) , delay , CloudSimTags . NETWORK_EVENT_HOST , pkt ) ; } packetList . clear ( ) ; } }
Gets the list of packets to be sent to each Host
 and forward them.
Gets the list of packets to be sent to each Host and forward them .