예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #6
0
 def to_binary(self):
     return uatype_UInt32.pack(self.TokenId)
예제 #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)
예제 #8
0
 def to_binary(self):
     return uatype_UInt32.pack(self.TokenId)