(23 . 10)(23 . 13)
200 def send(self, msg):
201 try:
202 full_message = str.encode(msg["body"])
203 self.server.print_debug("sending message: %s" % full_message)
204
205 signed_packet_bytes = self.infosec.pack(self, msg)
206 self.server.print_debug("packing message: %s" % full_message)
207 self.socket.sendto(signed_packet_bytes, (self.address, self.port))
208 self.server.print_debug("[%s:%d] <- %s" % (self.address,
209 self.port,
210 binascii.hexlify(signed_packet_bytes)[0:16]))
211
212 except Exception as ex:
213 print("Exception while attempting to encode message: %s" % ex)