I want to perform binding between two computers having ip addresses
172.18.2.11 and 172.18.2.95.So i wrote the following code(on the computer
having IP address 172.18.2.95):-
import socket
import sys
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
try:
s=s.bind(('172.18.2.11',2213))
print 'socket bind is complete'
except socket.error,msg:
print 'bind failed'
sys.exit()
The output is :-
bind failed
but when i am writting;-
s=s.bind(('localhost',2213))
the output is;-
socket bind is complete
Can you please tell me where i am making the error?
(The computers are connected as the ping operation is executing properly in
command prompt)
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor