TreePuncher
-
Posts
3 -
Joined
-
Last visited
Posts posted by TreePuncher
-
-
if it is locking the main thread while doing that, how come that it does not freeze my minecraft?
and how would you reccomand me on doing it then?
-
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
[1.13.2] InputStream only receives input on shutdown
in Modder Support
Posted
a live chat between multiple clients
where they dont require to be on the same server.