Skip to content

Commit

Permalink
socket manager minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Conor Flynn committed Mar 21, 2023
1 parent 9095e63 commit 61f6b2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ public void run() {

// execute valid response to engine
Response response = producer.send(tag, sub_tag, data);
// out.writeUTF(new JSONObject()
// .put("response", "200")
// .put("code", response.code())
// .put("message", response.message())
// .put("data", response.data())
// .toString());
// out.flush();
out.writeUTF(new JSONObject()
.put("response", "200")
.put("code", response.code())
.put("message", response.message())
.put("data", response.data())
.toString());
out.flush();

} catch(Exception e) {
break;
Expand Down Expand Up @@ -204,9 +204,9 @@ private static boolean synced(String key) {
private static final String readLine(DataInputStream in) throws IOException {
StringBuilder out = new StringBuilder();
char c = 0;
while((c = (char)in.read()) != 10)
while((c = (char)in.read()) != 10) {
out.append(c);

}
return out.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Config {
properties.put("app", app_properties);

Properties stream_properties = new Properties();
stream_properties.put("general.consumer.types", "socket_consumer");
stream_properties.put("general.consumer.types", "null");
stream_properties.put("general.producer.types", "socket_producer");
stream_properties.put("rest.socket.address", "DataEngine");
//stream_properties.put("rest.socket.address", "localhost");
Expand Down

0 comments on commit 61f6b2e

Please sign in to comment.