def _sync_sendall(self, data):
        """Internal use only; use 'sendall' instead.

        Synchronous version of async_sendall.
        """
        # TODO: is socket's sendall better?
        buf = buffer(data)
        while len(buf) > 0:
            sent = self._rsock.send(buf)
            if sent < 0:
                raise socket.error('hangup')
            buf = buf[sent:]
        return None
dataset/ETHPy150Open pgiri/asyncoro/py2/asyncoro/__init__.py/_AsyncSocket._sync_sendall/original