I initially opened a socket port. after a while, I disabled the php script (the socket port was not closed). when the script was re-run, how can I avoid repeated opening of socket ports with the same ip address and port ?? And how to reconnect to this port... I initially opened a socket port. after a while, I disabled the php script (the socket port was not closed). when the script was re-run, how can I avoid repeated opening of socket ports with the same ip address and port ?? And how to reconnect to this port for normal communication ??
Reply content:
I initially opened a socket port. after a while, I disabled the php script (the socket port was not closed). when the script was re-run, how can I avoid repeated opening of socket ports with the same ip address and port ?? And how to reconnect to this port for normal communication ??
If the process ends, the associated port will also be unbound. if you re-open the unable to bind the port, it means that your original process has not ended. check whether there is any script in the process. In addition, does the code that closes the port when you add it to the script completely solve this problem?