def to_binary(self): b = [] b.append(uatype_UInt32.pack(self.ProtocolVersion)) b.append(uatype_UInt32.pack(self.ReceiveBufferSize)) b.append(uatype_UInt32.pack(self.SendBufferSize)) b.append(uatype_UInt32.pack(self.MaxMessageSize)) b.append(uatype_UInt32.pack(self.MaxChunkCount)) b.append(uatypes.pack_string(self.EndpointUrl)) return b"".join(b)
def to_binary(self): b = [] b.append(struct.pack("<3ss", self.MessageType, self.ChunkType)) size = self.body_size + 8 if self.MessageType in (MessageType.SecureOpen, MessageType.SecureClose, MessageType.SecureMessage): size += 4 b.append(uatype_UInt32.pack(size)) if self.MessageType in (MessageType.SecureOpen, MessageType.SecureClose, MessageType.SecureMessage): b.append(uatype_UInt32.pack(self.ChannelId)) return b"".join(b)
def to_binary(self): b = [] b.append(uatype_UInt32.pack(self.SequenceNumber)) b.append(uatype_UInt32.pack(self.RequestId)) return b"".join(b)
def to_binary(self): return uatype_UInt32.pack(self.TokenId)