Skip to content
Advertisement

I can’t find the error in my socket python program

I was following a socket tutorial and suddenly there was a bug in my code that I couldn’t understand or find

Can anyone help me find the bug? I referenced with the tutorial code and it doesn’t work. The only way is to copy/paste and I don’t like it

this is my server.py file

JavaScript

And this is my client.py file

JavaScript

Advertisement

Answer

Can anyone help me find the bug?

JavaScript

You miscalculate the padding length of the header in the client. I don’t know why you thought the decrement of 1 were needed – it’s out of place, correct:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement