79624709

Date: 2025-05-16 07:50:56
Score: 1.5
Natty:
Report link

brother you have put the ip as localhost in both computers

localhost means the ip of the computer you are writing the code in,

to connect, enter the server's ip , the client's ip does not matter at all in the client's code

also specify this: socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM)

note: SOCK_STREAM is for tcp, SOCK_DGRAM is for udp

that's why when you tried it in one computer , the client ip was the same as server ip as localhost gives the current computer's ip

IF YOU WANT TO KNOW THE SERVER'S IP , TYPE ipconfig IN CMD PROMPT AND COPY THE WLAN IP, DO NOT COPY VIRTUAL BOX ETHERNET IP , YOU CAN ALSO COPY THE WIFI IP

I am young(14) but I know this well

please ask again if any doubt brother/sister

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user30554168