net.i2p.client

## Class I2CPSSLSocketFactory

- java.lang.Object
- - net.i2p.client.I2CPSSLSocketFactory

     class I2CPSSLSocketFactory
    extends Object

Loads trusted ASCII certs from ~/.i2p/certificates/ and $CWD/certificates/. Keeps a single static SSLContext for the whole JVM.

Since:
  0.8.3
Author:
  zzz

### Constructor Summary

Constructors
Constructor and Description
`I2CPSSLSocketFactory()`

### Method Summary

Methods
`static Socket` `createSocket(I2PAppContext ctx, String host, int port)` Initializes the static SSL Context if required, then returns a socket to the host.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### I2CPSSLSocketFactory

    I2CPSSLSocketFactory()

### Method Detail

#### createSocket

    public static Socket createSocket(I2PAppContext ctx,
                      String host,
                      int port)
                               throws IOException

Initializes the static SSL Context if required, then returns a socket to the host.

Parameters:
  `ctx` - just for logging
Throws:
  `IOException` - on init error or usual socket errors