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
def from_binary(data): hdr = AsymmetricAlgorithmHeader() hdr.SecurityPolicyURI = uatypes.unpack_string(data) hdr.SenderCertificate = uatypes.unpack_bytes(data) hdr.ReceiverCertificateThumbPrint = uatypes.unpack_bytes(data) return hdr
def from_binary(data): ack = ErrorMessage() ack.Error = uatypes.StatusCode.from_binary(data) ack.Reason = uatypes.unpack_string(data) return ack