Code example for SocketFactory

Methods: createSocket

0
            BOSHClientSocketConnectorFactory socketConnectorFactory, SSLConnector sslConnector) {
        this.uri = uri;
        this.sslConnector = sslConnector;
 
        try { 
            socket = factory.createSocket();
            socketConnector = socketConnectorFactory.createConnector(socket);
        } catch(IOException e) {
            // In the unlikely case that creating the socket itself fails, stash 
            // the error and it'll be returned from the first close(). 
            error = e;
            closed = true;
            return; 
        } 
         
        Runnable r = new Runnable() {
            public void run() { 
                threadMain(); 
            } 
        };