0

I've got a Socket, s and an long, 1312992.

DataOutputStream out = new DataOutputStream(s.getOutputStream());
out.writeLong(hwnd);
out.flush();

Doing

self.hwnd, = struct.unpack('!Q', self.appletconn.recv(8))
print(self.hwnd)

on the (python) receiving side prints out 51. I presume something's wrong with my sending code.

Thanks.

Name McChange
  • 2,750
  • 5
  • 27
  • 46

1 Answers1

0

Use a packet capture tool like tcpdump or wireshark and check what is going on the wire. I am guessing, you might be mixing text and binary on sending and/or receiving side.

Bimalesh Jha
  • 1,464
  • 9
  • 17