<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _send_loop(self):
 """ Waits for data in the output queue to send. """

        while True:
            try:
                line = self.oqueue.get().splitlines()[0][:500]
                self._obuffer += line + '\r\n'
                while self._obuffer:
                    sent = self._socket.send(self._obuffer)
                    self._obuffer = self._obuffer[sent:]
            except Exception:
                break