minecraft/networking/connection.py
def write_packet(self, packet, force=False):
        """Writes a packet to the server.

        If force is set to true, the method attempts to acquire the write lock
        and write the packet out immediately, and as such may block.

        If force is false then the packet will be added to the end of the
        packet writing queue to be sent 'as soon as possible'

        :param packet: The :class:`network.packets.Packet` to write
        :param force(bool): Specifies if the packet write should be immediate
        """
        if force:
            self._write_lock.acquire()
            if self.options.compression_enabled:
                packet.write(self.socket, self.options.compression_threshold)
            else:
                packet.write(self.socket)
            self._write_lock.release()
        else:
            self._outgoing_packet_queue.append(packet)
Writes a packet to the server.

        If force is set to true, the method attempts to acquire the write lock
        and write the packet out immediately, and as such may block.

        If force is false then the packet will be added to the end of the
        packet writing queue to be sent 'as soon as possible'

        :param packet: The :class:`network.packets.Packet` to write
        :param force(bool): Specifies if the packet write should be immediate
        
Writes a packet to the server.
If force is set to true, the method attempts to acquire the write lock
and write the packet out immediately, and as such may block.

If force is false then the packet will be added to the end of the
packet writing queue to be sent 'as soon as possible'
Writes a packet to the server . If force is set to true the method attempts to acquire the write lock and write the packet out immediately and as such may block . If force is false then the packet will be added to the end of the packet writing queue to be sent ' as soon as possible '
def write_packet(self, packet, force=False):
        if force:
            self._write_lock.acquire()
            if self.options.compression_enabled:
                packet.write(self.socket, self.options.compression_threshold)
            else:
                packet.write(self.socket)
            self._write_lock.release()
        else:
            self._outgoing_packet_queue.append(packet)
def write_packet ( self , packet , force = False ) : if force : self . _write_lock . acquire ( ) if self . options . compression_enabled : packet . write ( self . socket , self . options . compression_threshold ) else : packet . write ( self . socket ) self . _write_lock . release ( ) else : self . _outgoing_packet_queue . append ( packet )
Writes a packet to the server.
Writes a packet to the server .
"""Writes a packet to the server.

        If force is set to true, the method attempts to acquire the write lock
        and write the packet out immediately, and as such may block.

        If force is false then the packet will be added to the end of the
        packet writing queue to be sent 'as soon as possible'

        :param packet: The :class:`network.packets.Packet` to write
        :param force(bool): Specifies if the packet write should be immediate
        """
self
packet
The :class:`network.packets.Packet` to write
The : class : ` network . packets . Packet ` to write
force
force(bool)
Specifies if the packet write should be immediate
Specifies if the packet write should be immediate