I am trying to send an integer value from a server written in Python to a client written in C and when I convert the int value to htonl to send to the C like this:
size = bytes(socket.htonl(len(input)))
it returns this error: Protocol wrong type for socket for this line:
recv = connection.send(size)
How can I send an integer value over to the client in C in this way or is there an easier way?