link start!
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package com.tridium.io.net;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.ServerSocket;
|
||||
import javax.baja.io.net.IServerSocketFactory;
|
||||
|
||||
public class BasicServerSocketFactory
|
||||
implements IServerSocketFactory {
|
||||
public ServerSocket createServerSocket(int n) throws IOException {
|
||||
return new ServerSocket(n);
|
||||
}
|
||||
|
||||
public ServerSocket createServerSocket(int n, int n2) throws IOException {
|
||||
return new ServerSocket(n, n2);
|
||||
}
|
||||
|
||||
public ServerSocket createServerSocket(int n, int n2, InetAddress inetAddress) throws IOException {
|
||||
return new ServerSocket(n, n2, inetAddress);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user