I am writing a simple socket program, but it's not working. Can you please help.
import socket
s = socket.socket()
host = socket.gethostname()
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()
The below error I use to get.
s = socket.socket()
TypeError: 'module' object is not callable