Kern Sibbald wrote:
> Off hand, I would say that your first problem is that you are not using the
> Bacula network protocol, which is described in the Network chapter of the
> developer's manual -- you need to read the small print.
>
I do this on send and recive:
---8<----
def _send(self, data):
"""Prepend size of data before the data string
and send it trough the socket"""
size = struct.pack("!i", len(data))
self.socket.send(size + data)
def _recv(self, bufsize=BUFSIZE):
"""Recieve data from socket and strip the prepended
data size"""
r = self.socket.recv(bufsize)
size = struct.unpack("!i", r[:4])[0]
if size + 4 > BUFSIZE:
raise "Buffer to small"
return r[4:]
---8<----
How tiny is the small print? ;-)
regards
Holger
--
--
Holger Müller [email protected]
dass IT GmbH Phone: +49.221.3565666-95
http://www.dass-IT.de Fax: +49.221.3565666-10
Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRB52500=20
Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens, P. Storz
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel