| | |
| | | * If the protocol session could not be established for some other |
| | | * reason. |
| | | */ |
| | | public ProtocolSession createClientSession(final Socket socket, |
| | | public Session createClientSession(final Socket socket, |
| | | final int soTimeout) throws ConfigException, IOException |
| | | { |
| | | boolean hasCompleted = false; |
| | |
| | | // Force TLS negotiation now. |
| | | secureSocket.startHandshake(); |
| | | hasCompleted = true; |
| | | return new TLSSocketSession(socket, secureSocket); |
| | | return new Session(socket, secureSocket); |
| | | } |
| | | finally |
| | | { |
| | |
| | | * If the protocol session could not be established for some other |
| | | * reason. |
| | | */ |
| | | public ProtocolSession createServerSession(final Socket socket, |
| | | public Session createServerSession(final Socket socket, |
| | | final int soTimeout) throws ConfigException, IOException |
| | | { |
| | | boolean hasCompleted = false; |
| | |
| | | // Force TLS negotiation now. |
| | | secureSocket.startHandshake(); |
| | | hasCompleted = true; |
| | | return new TLSSocketSession(socket, secureSocket); |
| | | return new Session(socket, secureSocket); |
| | | } |
| | | catch (final SSLException e) |
| | | { |