Ejemplo n.º 1
0
 def from_binary(data):
     hello = Hello()
     hello.ProtocolVersion = uatype_UInt32.unpack(data.read(4))[0]
     hello.ReceiveBufferSize = uatype_UInt32.unpack(data.read(4))[0]
     hello.SendBufferSize = uatype_UInt32.unpack(data.read(4))[0]
     hello.MaxMessageSize = uatype_UInt32.unpack(data.read(4))[0]
     hello.MaxChunkCount = uatype_UInt32.unpack(data.read(4))[0]
     hello.EndpointUrl = uatypes.unpack_string(data)
     return hello
Ejemplo n.º 2
0
 def from_binary(data):
     hello = Hello()
     hello.ProtocolVersion = struct.unpack("<I", data.read(4))[0]
     hello.ReceiveBufferSize = struct.unpack("<I", data.read(4))[0]
     hello.SendBufferSize = struct.unpack("<I", data.read(4))[0]
     hello.MaxMessageSize = struct.unpack("<I", data.read(4))[0]
     hello.MaxChunkCount = struct.unpack("<I", data.read(4))[0]
     hello.EndpointUrl = uatypes.unpack_string(data)
     return hello
Ejemplo n.º 3
0
 def from_binary(data):
     ack = ErrorMessage()
     ack.Error = uatypes.StatusCode.from_binary(data)
     ack.Reason = uatypes.unpack_string(data)
     return ack
Ejemplo n.º 4
0
 def from_binary(data):
     ack = ErrorMessage()
     ack.Error = uatypes.StatusCode.from_binary(data)
     ack.Reason = uatypes.unpack_string(data)
     return ack