Package com.sun.faban.driver.transport.util

Examples of com.sun.faban.driver.transport.util.TimedSocketWrapper


            (SSLSocketFactory) SSLSocketFactory.getDefault();

    public Socket createSocket(String host, int port, InetAddress localAddress,
                               int localPort) throws IOException {

        Socket socket = new TimedSocketWrapper(sslFactory.createSocket());
        InetSocketAddress endpoint = new InetSocketAddress(host, port);
        socket.bind(new InetSocketAddress(localAddress, localPort));
        socket.connect(endpoint);
        return socket;
    }
View Full Code Here


        }
        int timeout = params.getConnectionTimeout();
        if (timeout <= 0) {
            return createSocket(host, port, localAddress, localPort);
        } else {
            Socket socket = new TimedSocketWrapper(sslFactory.createSocket());
            InetSocketAddress endpoint = new InetSocketAddress(host, port);
            socket.bind(new InetSocketAddress(localAddress, localPort));
            socket.connect(endpoint, timeout);
            return socket;
        }
    }
View Full Code Here

            return socket;
        }
    }

    public Socket createSocket(String host, int port) throws IOException {
        Socket socket = new TimedSocketWrapper(sslFactory.createSocket());
        InetSocketAddress endpoint = new InetSocketAddress(host, port);
        socket.connect(endpoint);
        return socket;
    }
View Full Code Here

                               boolean close)
            throws IOException, UnknownHostException {

        // Starting the timer at this point is the most accurate we can do
        // with an existing socket - so the time includes createSocket.
        TimedSocketWrapper wrapper = new TimedSocketWrapper();
        wrapper.setSocket(sslFactory.createSocket(socket, host, port, close));
        return wrapper;
    }
View Full Code Here

TOP

Related Classes of com.sun.faban.driver.transport.util.TimedSocketWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.