Standardizing for PKGBUILD

This commit is contained in:
DarkFeather
2019-04-30 15:53:55 -05:00
parent e7c96f98bb
commit 4b383874b6
8 changed files with 291 additions and 0 deletions

35
Java/PortTest.java Normal file
View File

@@ -0,0 +1,35 @@
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.io.PrintWriter;
import java.io.IOException;
public class PortTest {
private String host;
private int port;
public PortTest(String host, int port) {
this.host=host;
this.port=port;
}
public void Test() {
try {
Socket socket = new Socket(this.host,this.port);
PrintWriter out = new PrintWriter(socket.getOutputStream(),true);
out.println("");
System.out.println("OK");
} catch (Exception e) { System.out.println(e.getMessage()); }
}
public static void main(String[] args) {
try {
PortTest t = new PortTest(args[0],Integer.parseInt(args[1]));
t.Test();
}
catch (Exception e) {
System.out.println(e.getMessage());
}
}
}