I have a C socket server that receives XDR data. I wrote C and a Java client. I am trying to write a Python client using xdrlib
.
import xdrlib p = xdrlib.Packer() p.pack_int(5) p.pack_int(4) p.pack_int(3) data = p.get_buffer()
When I decode this through the server, the data is different. This is because the data is encoded for reading through the xdrmem decoder. (they have no beginning or end to the recording).
Does anyone know if there is a library for python that supports xdr writing? In c, this is done through xdrrec_create
, and in Java it is called XdrTcpEncodingStream
.
source share