so I have a Socket and trying to get data from the socket but I only get the data when I shutdown the socket
here is my code
try{
Socket socket = new Socket(host,port);
InputStream input = socket.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader((input)));
String line;
while ((line = reader.readLine()) != null) {
System.out.printIn(line);
}
}
so it only logs the line when I shutdown the server...
but I want it to log the line everytime the socket sends something
btw I run the socket in a new thread aswell otherwise it froze my minecraft