Hello everybody i have a trouble making datatransmition with mine program just to give the idea im trying to move this blocks when i move mine carsHere I leave the encoding of mine server/client program package com.mygdx.Xrace;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.PrintWriter;import java.net.ServerSocket;import java.net.Socket;public class ScreenServidor extends Pantallabase{        ScreenCarrera carrera;        MyTextInputListener listener;        ServerSocket server ;        float delta = 0.01f;        int puerto=9600;        public ScreenServidor(Main game) {            super(game);        }        @Override               public void show()        {            carrera=new ScreenCarrera(game);            carrera.show();            try {                server = new ServerSocket(puerto);                new User(server.accept()).start();            } catch (IOException e) {                 System.out.println(e);                }finally{                        try {                            server.close();                        } catch (IOException e) {                             System.out.println(e);                        }                }        }           @Override        public void render(float delta)        {            carrera.render(delta);        }        @Override        public void dispose(){            carrera.dispose();            }        @Override        public void resize(int width, int height) {}        @Override        public void pause() {}        @Override        public void resume() {}        @Override        public void hide() {        }}class User extends Thread{    BufferedReader in;    PrintWriter out;    Socket conexion;    ScreenCarrera carrera;    public User(Socket serv)    {        this.conexion=serv;    }    public void run() {        try {            in = new BufferedReader(new InputStreamReader(conexion.getInputStream()));             out=new PrintWriter(conexion.getOutputStream(),true);            **carrera.m.posx2=in.read();** //receiving data            **out.print(carrera.m.posx1);**//sending data            } catch (IOException e) {                 System.out.println(e);        }finally{            try {            in.close();            out.close();            conexion.close();            } catch (IOException e) {}    }    }}package com.mygdx.Xrace;import java.net.*;import java.io.*;import com.badlogic.gdx.Gdx;public class ScreenCliente extends Pantallabase{    Socket conexion;    ScreenCarrera carrera;    PrintStream out ;    MyTextInputListener listener;    BufferedReader in;    float delta = 0.01f;    int puerto=9600;    static String ip;    public ScreenCliente(Main game) {        super(game);    }    @Override    public void show() {        carrera=new ScreenCarrera(game);        carrera.show();        conexion=new Socket();        listener = new MyTextInputListener();        Gdx.input.getTextInput(listener, ingrese ip, ip, ip);        try {            conexion =new Socket(ip,puerto);            out = new PrintStream(conexion.getOutputStream(),true);            in = new BufferedReader(new InputStreamReader(conexion.getInputStream()));        }catch(Exception e){e.printStackTrace();}    }    @Override    public void render(float delta) {        carrera.render(delta);        try{        **carrera.m.posx2=in.read()**;        } catch (IOException e) {            e.printStackTrace();            game.m.mensaje=error de conexion;            game.setScreen(game.m);        }try {            run();        } catch (IOException e) {            e.printStackTrace();        }    }    private void run() throws IOException{         **out.print(carrera.m.posx1);**    }    @Override    public void resize(int width, int height) {    }    @Override    public void pause() {    }    @Override    public void resume() {    }    @Override    public void hide() {    }    @Override    public void dispose() {        carrera.dispose();        try {            in.close();            out.close();            conexion.close();    } catch (IOException e) {        e.printStackTrace();    }    }}
Trouble using java connectivity and data transmition on libgdx
javascript