Hi,
I have this problem: My program should be to do this, client send datagram to server and server send datagram to another client. But My program send datagram to server server recived but server doesn´t send to another client. My server code:
This should be to do.Client send text and server send back. I am sory my English is not good. I hope you understand me.try { DatagramSocket server = new DatagramSocket(5000); byte[] poslana = new byte[256]; byte[] prijata = new byte[256]; byte[] preposi = new byte[256]; byte ip[] = { Network.ip(127), Network.ip(0), Network.ip(0), Network.ip(1)}; InetAddress kolo = InetAddress.getByAddress(ip); while (true) { DatagramPacket prijatyPaket = new DatagramPacket(prijata,prijata.length); server.receive(prijatyPaket); String prepos = new String(prijatyPaket.getData()); preposi = prepos.getBytes(); InetAddress adresa = InetAddress.getByAddress(ip); DatagramPacket odeslat = new DatagramPacket(preposi,preposi.length,adresa,5000); server.send(odeslat);
Thank you for your advice.