From 467a545725186663cfa917ba0c08a4e3d79443de Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 19 Jul 2020 11:45:49 -0700 Subject: [PATCH] Add network messages to RequestBasic, added network messages to Request (but disabled them because they're spammy) --- src/main/java/org/cyberpwn/react/network/Request.java | 3 +++ src/main/java/org/cyberpwn/react/network/RequestBasic.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/org/cyberpwn/react/network/Request.java b/src/main/java/org/cyberpwn/react/network/Request.java index db3529b..c25c23b 100644 --- a/src/main/java/org/cyberpwn/react/network/Request.java +++ b/src/main/java/org/cyberpwn/react/network/Request.java @@ -1,5 +1,6 @@ package org.cyberpwn.react.network; +import org.cyberpwn.react.L; import org.cyberpwn.react.util.GMap; import org.json.JSONObject; @@ -24,10 +25,12 @@ public void run() { DataInputStream i = new DataInputStream(s.getInputStream()); DataOutputStream o = new DataOutputStream(s.getOutputStream()); PacketRequest pr = new PacketRequest(ns.getUsername(), ns.getPassword(), PacketRequestType.GET_SAMPLES.toString()); + //L.n("OUT: " + pr.toString()); o.writeUTF(pr.toString()); o.flush(); String response = i.readUTF(); PacketResponse ps = new PacketResponse(new JSONObject(response)); + //L.n("IN: " + ps.toString()); GMap data = new GMap<>(); String console = ""; diff --git a/src/main/java/org/cyberpwn/react/network/RequestBasic.java b/src/main/java/org/cyberpwn/react/network/RequestBasic.java index b7e702a..694494a 100644 --- a/src/main/java/org/cyberpwn/react/network/RequestBasic.java +++ b/src/main/java/org/cyberpwn/react/network/RequestBasic.java @@ -1,5 +1,6 @@ package org.cyberpwn.react.network; +import org.cyberpwn.react.L; import org.cyberpwn.react.util.GMap; import org.json.JSONObject; @@ -24,10 +25,12 @@ public void run() { DataInputStream i = new DataInputStream(s.getInputStream()); DataOutputStream o = new DataOutputStream(s.getOutputStream()); PacketRequest pr = new PacketRequest(ns.getUsername(), ns.getPassword(), PacketRequestType.GET_BASIC.toString()); + L.n("OUT: " + pr.toString()); o.writeUTF(pr.toString()); o.flush(); String response = i.readUTF(); PacketResponse ps = new PacketResponse(new JSONObject(response)); + L.n("IN: " + ps.toString()); GMap data = new GMap<>(); if (ps.getString("type").equals("OK")) {