Commit ab35a18e authored by adwisatya's avatar adwisatya
Browse files

X

parent c8107b45
...@@ -28,8 +28,8 @@ import org.json.JSONObject; ...@@ -28,8 +28,8 @@ import org.json.JSONObject;
public class Connection { public class Connection {
String response; String response;
String request; String request;
private static String URL = "167.205.32.46"; private static String URL = "192.168.0.107";
private static int defPort = 8025; private static int defPort = 6789;
private String token = "kosong"; private String token = "kosong";
...@@ -37,10 +37,6 @@ public class Connection { ...@@ -37,10 +37,6 @@ public class Connection {
Socket miniSocket = new Socket(URL,defPort); Socket miniSocket = new Socket(URL,defPort);
JSONObject obj = new JSONObject(JSON); JSONObject obj = new JSONObject(JSON);
// obj.put("method", "join");
// obj.put("ip", "167.205.32.46");
// obj.put("port", new Integer(8000));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(miniSocket.getOutputStream()))); PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(miniSocket.getOutputStream())));
out.println(obj); out.println(obj);
out.println(); out.println();
......
#Sun, 26 Apr 2015 16:00:29 +0700 #Sun, 26 Apr 2015 20:27:08 +0700
F\:\\z~edo\\Kuliah\\Semester\ 6\\IF3230\ Sistem\ Paralel\ dan\ Terdistribusi\\Tugas\ Akhir\\src\\server= C\:\\Users\\adwisatya\\Documents\\Semester\ 6\\Tugas\\IF3230\ Sister\\IF3230-Tugas-Besar-Sister-2015\\src\\server=
...@@ -99,7 +99,7 @@ public class Client extends Thread{ ...@@ -99,7 +99,7 @@ public class Client extends Thread{
public void sendToClient(String tmpStr) throws IOException{ public void sendToClient(String tmpStr) throws IOException{
PrintStream out = new PrintStream(connectionSocket.getOutputStream()); PrintStream out = new PrintStream(connectionSocket.getOutputStream());
out.print(tmpStr); out.print(tmpStr);
System.out.println(tmpStr);
} }
public void checkCommand(String cmd) throws IOException, NoSuchAlgorithmException, JSONException { public void checkCommand(String cmd) throws IOException, NoSuchAlgorithmException, JSONException {
cmdJoin(); cmdJoin();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment