data = unpack('>L', sock.recv(4))

Does this line of code means, incoming data is big endian and so unpack to endianess of local machine and assign to data. If local machine is little endian, then big endian is automatically converted to little endian format?

The function "unpack" is not a built-in function. Does your code import some module at the top?

Jeff

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.