original_docstring: 
          Reads a packet from a socket
          
docstring: Reads a packet from a socket
docstring_tokens: Reads a packet from a socket
code: def read_packet(self):
          """
          Reads a packet from a socket
          """
          # Read the size of the packet
          socket_in = self.request
          psize = bytearray(3)
          socket_in.recv_into(psize, 3)
  
          size = getSize(psize) + 1
  
          # Read the rest of the packet
          packet_payload = bytearray(size)
          socket_in.recv_into(packet_payload, size)
  
          # Combine the chunks
          psize.extend(packet_payload)
  
          return psize
code_tokens: def read_packet ( self ) : socket_in = self . request psize = bytearray ( 3 ) socket_in . recv_into ( psize , 3 ) size = getSize ( psize ) + 1 packet_payload = bytearray ( size ) socket_in . recv_into ( packet_payload , size ) psize . extend ( packet_payload ) return psize
short_docstring: Reads a packet from a socket
short_docstring_tokens: Reads a packet from a socket
comment: """
          Reads a packet from a socket
          """$SEP$# Read the size of the packet$SEP$# Read the rest of the packet$SEP$# Combine the chunks