Commit fa4e26e6 authored by Rikysamuel's avatar Rikysamuel
Browse files

Merge branch 'master' of...

Merge branch 'master' of http://gitlab.informatika.org/sinambelajunita/IF3230-Tugas-Besar-Sister-2015
parents 7ba34f2c 087aaa63
......@@ -30,11 +30,11 @@ public class ClientHandler extends Thread{
InputStream in = clientSocket.getInputStream();
DataOutputStream out = new DataOutputStream(clientSocket.getOutputStream());
byte[] byt = new byte[10240];
byte[] byt = new byte[4096];
int count = in.read(byt);
String request = new String(byt);
if(request != null){
request = request.substring(0,count);
if(!request.equals("")){
// request = request.substring(0,count);
log("Request : " + request);
String response = Message.receive(request);
log("Response : " + response);
......
......@@ -38,7 +38,7 @@ public class Server {
out.write(j.toString().getBytes());
String data = null;
byte[] byt = new byte[10240];
byte[] byt = new byte[4096];
int count = in.read(byt);
data = new String(byt);
if(data != null || !"null".equals(data)) {
......
......@@ -43,7 +43,7 @@ public class ServerHandler{
int count = in.read(byt);
request = new String(byt);
if(response != null) {
request = request.substring(0,count);
// request = request.substring(0,count);
listResponses.add(response);
}
} catch (IOException ex) {
......
......@@ -144,7 +144,7 @@ public class Message {
response = error();
}
try {
JSONArray arrayServerJSON = new JSONArray(json.getString("server"));
JSONArray arrayServerJSON = json.getJSONArray("server");
TrackerMessageHandler.handleJSONArrayofServer(arrayServerJSON);
response = statusOKOnly();
} catch (JSONException ex) {
......
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