/* * Decompiled with CFR 0.152. */ package com.tridium.io.net; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.net.UnknownHostException; import javax.baja.io.net.IClientSocketFactory; public class BasicClientSocketFactory implements IClientSocketFactory { protected static IClientSocketFactory instance = null; public static IClientSocketFactory getInstance() { if (instance == null) { instance = new BasicClientSocketFactory(); } return instance; } public Socket createSocket(InetAddress inetAddress, int n) throws IOException { return new Socket(inetAddress, n); } public Socket createSocket(InetAddress inetAddress, int n, int n2) throws IOException { Socket socket = new Socket(); socket.connect(new InetSocketAddress(inetAddress, n), n2); return socket; } public Socket createSocket(InetAddress inetAddress, int n, InetAddress inetAddress2, int n2) throws IOException { return new Socket(inetAddress, n, inetAddress2, n2); } public Socket createSocket(String string, int n) throws IOException, UnknownHostException { return new Socket(string, n); } public Socket createSocket(String string, int n, int n2) throws IOException, UnknownHostException { Socket socket = new Socket(); socket.connect(new InetSocketAddress(string, n), n2); return socket; } public Socket createSocket(String string, int n, InetAddress inetAddress, int n2) throws IOException, UnknownHostException { return new Socket(string, n, inetAddress, n2); } private BasicClientSocketFactory() { } }