Java Code Examples for java.net.Socket.setSocketImplFactory()

The following are Jave code examples for showing how to use setSocketImplFactory() of the java.net.Socket class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Lantern-sdk   File: RYLA.java   View Source Code Vote up 5 votes
public void startNetworkTracing() {
    //URL.setURLStreamHandlerFactory(new LanternURLStreamHandlerFactory());
    if(Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
        try {
            // TODO 응답 시간 가져올것 (connect ~ close 까지)
            LanternSocketFactory sf = new LanternSocketFactory();
            Socket.setSocketImplFactory(sf);
            SSLSocket.setSocketImplFactory(sf);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}