def _read_socket(self):
while True:<EOL><INDENT>base_bytes = self._socket.recv(BASE_SIZE)<EOL>base = basemessage.parse(base_bytes)<EOL>payload_bytes = self._socket.recv(base.payload_length)<EOL>self._handle_message(packet.parse(base_bytes + payload_bytes))<EOL><DEDENT>
Process incoming messages from socket.