IntelliJ Java IDE
The moose likes Applets and the fly likes how to stop server? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "how to stop server?" Watch "how to stop server?" New topic
Author

how to stop server?

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
hi, I connect applet to server by socket. When I finish browser, how can I stop server which is writen by myself?
Thanx,
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4120

Simon,
You do not need to stop your server program... it has to continuously run to listen for connections on it's ServerSocket... if you really wanted to, I guess you could have some method in your Server that closed all the sockets connected to it and killed the server, and then in your applet's destroy() method have it send some message to the server that launched this function... However, you would have to manually start (i.e. run the server from the command line) the server again before any applet could connect to it... which is probably a bad idea...
HTH,
-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
 
subject: how to stop server?
 
Threads others viewed
JBoss -5.0.0 installation fails
How to stop start the J2EE 1.3 server?
Starting and Stopping the Server (RMI)
about the stop rmi
How to close a rmi registry with codes???
developer file tools