List of usage examples for javax.net.ssl SSLServerSocket close
public void close() throws IOException
From source file:SecureServer.java
public static void main(String[] args) throws Exception { ServerSocketFactory ssf = SSLServerSocketFactory.getDefault(); SSLServerSocket ss = (SSLServerSocket) ssf.createServerSocket(98999); Socket sock = ss.accept();// w ww .j a va 2s. com ss.close(); OutputStream rawOut = sock.getOutputStream(); PrintWriter out = new PrintWriter(new OutputStreamWriter(rawOut)); out.println(new java.util.Date().toString()); out.flush(); sock.close(); }