I've tried to connect two computers with a socket in Python and I don't know why it doesn't work. The files are from internet and it compiles for me but without any results.
The server.py:
#!/usr/bin/python import socket s = socket.socket() host = '' port = 12345 s.bind((host, port)) s.listen(5) while True: c, addr = s.accept() print 'Got connection from', addr c.send('Thank you for connecting') c.close() and the client.py:
#!/usr/bin/python import socket s = socket.socket() host = # here I put the ip of the server's laptop port = 12345 s.connect((host, port)) print s.recv(1024) s.close() What's wrong?
sendwithsendall.