niagara-ax/modules/cfr_output/com/tridium/io/net/BasicClientSocketFactory.java
2026-03-17 13:31:18 -07:00

56 lines
1.7 KiB
Java

/*
* 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() {
}
}