How to stop the server out of the process

Hi all,I'm developing a server program, it is a socket server, and I use multiple threads to process the request. But how do I stop the server out of the process?I even cannot stop it when it stop in accept() method.Hope anyone can help me .Thanks.
[284 byte] By [Palmer_Tsea] at [2007-10-3 2:10:02]
# 1
Close the ServerSocket. That should cause accept() to throw an exception. When all the threads including threads started for accepted sockets have finished, the program should exit.
ejpa at 2007-7-14 19:08:56 > top of Java-index,Archived Forums,Socket Programming...
# 2
but how can I close the ServerSocket out of the process?
Palmer_Tsea at 2007-7-14 19:08:56 > top of Java-index,Archived Forums,Socket Programming...
# 3
Add a close command to the protocol. Connect to the server, send the close command. At the server, the close command closes the ServerSocket. Simple.
ejpa at 2007-7-14 19:08:56 > top of Java-index,Archived Forums,Socket Programming...