public Socket accept() throws IOException { return delegate.accept(); }
protected void accept() { try(SSLSocket client_sock=(SSLSocket)srv_sock.accept()) { client_sock.setEnabledCipherSuites(client_sock.getSupportedCipherSuites()); client_sock.startHandshake();
private void waitForConnection() throws IOException { clientSocket = (SSLSocket) serverSocket.accept(); final InputStream clientSocketInputStream = clientSocket.getInputStream(); syslogReader = createTLSSyslogReader(clientSocketInputStream); }
final SSLSocket client = (SSLSocket) mSocket.accept();
@Override public SSLSocket call() throws Exception { SSLSocket sslSocket = (SSLSocket) listeningSocket.accept(); sslSocket.addHandshakeCompletedListener(new HandshakeCompletedListener() { @Override public void handshakeCompleted(HandshakeCompletedEvent handshakeCompletedEvent) { handshakesCompleted.getAndIncrement(); } }); Assert.assertEquals(1, sslSocket.getInputStream().read()); try { // 2nd read is after the renegotiation attempt and will fail sslSocket.getInputStream().read(); return sslSocket; } catch (Exception e) { forceClose(sslSocket); throw e; } } });
public SocketChannel accept() throws IOException { return new SSLSocketChannel((SSLSocket)_socket.accept()); }
@Override public Socket accept() throws IOException { return checkLocal(ss.accept()); }
public Socket accept() throws IOException { return delegate.accept(); }
public Socket accept() throws IOException { return delegate.accept(); }
public Socket accept() throws IOException { return delegate.accept(); }
@Override public SSLChannel accept() throws IOException { return new SSLChannel((SSLSocket) _sslSocket.accept(), _timeout); } }
@Override public Socket accept() throws IOException { final Socket delegate = super.accept(); return new OpenSSLSocket(delegate, true, (OpenSSLEngine) openSSLContextSPI.createSSLEngine()); }
@Override public Socket accept() throws IOException { final Socket delegate = super.accept(); return new OpenSSLSocket(delegate, true, (OpenSSLEngine) openSSLContextSPI.createSSLEngine()); }
@Override public Void call() throws Exception { Socket clientSocket = serverSocket.accept(); readLen.set(clientSocket.getInputStream().read(buf)); return null; } });
@Override public Boolean call() throws Exception { final SSLSocket socket = (SSLSocket) serverSocket.accept(); try { socket.getSession(); } finally { socket.close(); } return Boolean.FALSE; } });
@Override public Boolean call() throws Exception { final SSLSocket socket = (SSLSocket) serverSocket.accept(); try { socket.getSession(); } finally { socket.close(); } return Boolean.FALSE; } });
@Override public Boolean call() throws Exception { final SSLSocket socket = (SSLSocket) serverSocket.accept(); try { socket.getSession(); } finally { socket.close(); } return Boolean.FALSE; } });
@Override public void run() { try (Socket socket = server.accept()) { try (DataInputStream in = new DataInputStream(socket.getInputStream())) { receivedData = ByteStreams.toByteArray(in); } } catch (final IOException e) { throw new IllegalStateException(e); } try { server.close(); } catch (final IOException e) { throw new IllegalStateException(e); } semaphore.release(); }
@Override public void run() { try { sslServerSocket.setNeedClientAuth(clientAuth == ClientAuth.WITH_CLIENT_AUTH); sslServerSocket.setReuseAddress(true); Socket clientSocket = sslServerSocket.accept(); OutputStreamWriter streamWriter = new OutputStreamWriter(clientSocket.getOutputStream(), StandardCharsets.UTF_8); PrintWriter out = new PrintWriter(streamWriter, true); out.println(message); clientSocket.close(); } catch (IOException e) { Throwables.propagate(e); } } };
@Override public Principal call() throws Exception { final SSLSocket socket = (SSLSocket) serverSocket.accept(); try { final SSLSession session = socket.getSession(); final Principal clientPrincipal = session.getPeerPrincipal(); final OutputStream outputStream = socket.getOutputStream(); outputStream.write(new byte[]{'H', 'i'}); outputStream.flush(); return clientPrincipal; } finally { socket.close(); } } });