I have a client sending out a request to the server on a DatagramSocket on port 9876 (to the servers ip). The server is listening on a DatagramSocket on port 9876 so that i can get the request. Once it gets the request, the server will send out a responce to a group of addresses (all the clients).
The problem is, the Client is listening on a MulticastSocket on port 9876 for the responce from the server, but it hears its own request that it sent out on that same port, and so it thinks its gotton a reply from the server (even though it hasnt). This happens even if the sever isnt running so thats how i know it must be hearing its own request and thinking its a server responce. The client and server are on the same computer so they will have the same ip address. Maybe this is why the client is getting his own request back, cause technically it is addressed to him?
Anyone know how i can fix this problem?
Thanks.