Hi, I have a question about sockets, I am going to try to explain everything to you so that you can solve this doubt I have, I hope not to disappoint you with my question. Well, the problem I have is that when I'm using a client I can put as many sockets as I want just as always:
server1=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
server1.connect((servidor,8081))
And I can even use different sockets with the same ports. Which I find curious. But when I close these sockets in this way from the client
server1.close()
To use them again I can not have to create a second socket again to do something else or repeat the same thing I did before.
So my question is there is some way to close the sockets so that you can reuse them and even loop to repeat certain things. Since it is very annoying to create a socket every time I want to do something and also I am very limited
Try close but do not close.