this is my Client code
Random rand = new Random();
int n = rand.nextInt(50) + 1;
DataInputStream dis = new DataInputStream(_socket.getInputStream());
DataOutputStream dos = new DataOutputStream(_socket.getOutputStream());
dos.writeInt(n);
and this is the Server code
try {
DataInputStream dis = new DataInputStream(socket.getInputStream());
BufferedReader input = new BufferedReader(new InputStreamReader(dis));
int fromClient = input.read();
System.out.println(fromClient);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
But i don't recive anything in fromClient , even if i chnage it like this
System.out.println(fromClient+"test");
i don't got result