def _write_out(self, bytes): tstart = osutils.timer_func() osutils.send_all(self.socket, bytes, self._report_activity) if 'hpss' in debug.debug_flags: thread_id = thread.get_ident() trace.mutter('%12s: [%s] %d bytes to the socket in %.3fs' % ('wrote', thread_id, len(bytes), osutils.timer_func() - tstart))
def _accept_bytes(self, bytes): """See SmartClientMedium.accept_bytes.""" self._ensure_connection() osutils.send_all(self._socket, bytes, self._report_activity)