connect() usage:
public static String host = “192.168.1.2”;
public static int tcp_port = 8888, udp_port = 8889;
@Override
protected Boolean doInBackground(Void... arg0) {
try {
c.client.connect(10000, host, tcp_port, udp_port);
// Server communication after connection can go here, or in Listener#connected().
} catch (IOException e) {
e.printStackTrace();
}
if (c.client.isConnected()){
LoggedIn = true;
return true;
}
else return false;
}
This is the constructor usage on the client: (it’s just clear - maybe there is a mistake cause on the server I have values).
client = new Client();
Network.register(client);
client.start();
Server:
server = new Server(9000000,9000000)
- I know that these values are unreal, but it’s just for testing
Everything was running fine since today somehow
The only problem is here that when objects are being send from the server to the client via UDP, they don’t arrive (maybe they do, but they’re not complete, broken somehow).
#your edit
I know how this works, already did some things with UDP and they were working…