Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 def to_binary(self):
     b = []
     b.append(uatype_UInt32.pack(self.SequenceNumber))
     b.append(uatype_UInt32.pack(self.RequestId))
     return b"".join(b)
Ejemplo n.º 6
0
 def to_binary(self):
     return uatype_UInt32.pack(self.TokenId)
Ejemplo n.º 7
0
 def to_binary(self):
     b = []
     b.append(uatype_UInt32.pack(self.SequenceNumber))
     b.append(uatype_UInt32.pack(self.RequestId))
     return b"".join(b)
Ejemplo n.º 8
0
 def to_binary(self):
     return uatype_UInt32.pack(self.TokenId)