Skip to content Skip to sidebar Skip to footer

Please Help Me In Socket Programming In Python

Problem while making connection with server. server side: import socket import threading import sys ip = 'let ip address of server, cant type real one for security purposes, exampl

Solution 1:

The IP address you pass to client.connect() should be the IP address of the computer where the server is running (if it's the same computer as where the client is running, you can just pass 127.0.0.1 as that address always means localhost). For the bind() call I recommend passing in '' (i.e. an empty string) as the address, so that your server will accept incoming connections from any active network interface. You only need to pass in an explicit IP address to bind() if you want limit incoming connections to only those coming through the local network card that is associated with the specified IP address.


Post a Comment for "Please Help Me In Socket Programming In Python"