I am trying to build a socket in TCL using the socket -server accept <port> command and then using the vwait forever loop - The simplest possible socket.
I am able to connect to the server fine but my issue is -- How do I close the socket when it is no longer needed without having to exit the application.
Some context on my application:
It is a Synopsys tool with a TCL shell.
I am planning on building a GUI using TK and ideally, I would like to develop it in Python for scalability reasons (plus the TK interface through Synopsys TCL shell is not the regular TCL/TK interface).
When the
foreverevent loop is running, the shell is constantly listening - Making the application's own TCL user prompt unavailable - I am not expecting that the shell will be available when some command over the socket is running, but I do expect the shell to be available once the command over the socket is completed. (I understand that this will be a little complex to implement....but just putting the question out)When I try using the
exitcommand passed through the socket, the application (the entire one) is closed.
Is there any command that I can pass over the socket to close the socket only and not close the entire application?
Please let me know if more details are needed.