+ 1
Why compiler shows error "Time Exceeds"
#importing Socket library import socket #creating a socket s=socket.socket() #reserve a port number port = 1213 #Binding a port s.bind(('',port)) print("Socket Binded to port %s"%(port)) #Listing a socket s.listen(5) print("Socket is now Listning") #Creating loop until error occures or until it exists while True: c,addr = s.accept()
4 ответов
+ 1
I know little about Socket but I'm pretty sure your loop doesn't stop when an error occurs or until a connection exists, but rather keeps on calling accept() infinitely.
+ 1
Hmmm, u are great bro
+ 1
https://docs.python.org/3/howto/sockets.html#creating-a-socket
0
Bro but..
If i stop loop..
How can client connects to server...