UDP Datagram Reply Issue

Hello Everyone....

I'm doing a project in which i need to send datagrams to clients waiting on particular port. I want the client to reply to the server's port from which the datagram is sent. Is this possible ?

I have tried this by creating a DatagramSocket with empty constructor and sent the packet to the particular port on client. In turn, on receiving the packet from the server, the client sends the reply to the port got from received DatagramPacket's getPort method.. But, I'm not getting the packet back to the server.

Please help me...

Thanking you in advance...

R. Kaja Mohideen

[631 byte] By [Kaja.Mohideena] at [2007-11-27 0:29:07]
# 1
Received DatagramPacket already has source address and port set, so you could simply do:packet.setData(.....);socket.send(packet);
hiwaa at 2007-7-11 22:31:11 > top of Java-index,Java Essentials,Java Programming...
# 2
Thank you... I got that working...
Kaja.Mohideena at 2007-7-11 22:31:11 > top of Java-index,Java Essentials,Java Programming...