0

I am trying to make a client-server program in Java. Actually clients can get in touch with my server computer since the forwarding is set for port 7777 on my router. Therefore, I get their messages fine. Once I get a message from a client I keep the socket object open (I don't close any Input or Output stream) and then try to send a message back. I do not get any exceptions at all so I am pretty sure the message is delivered fine to the socket's IP, I have even tried sending and answering with my own server computer and it works fine. So what is going on is that by keeping the socket I do know the IP address from the client and the message gets to the client's router fine. What I think is not happening is that the router does not deliver the message to that client since it does not have to know it. I am kind of lost right now, it is driving me crazy now. Thanks

Okcerk
  • 89
  • 1
  • 4

1 Answers1

3

May be you can try flush() method.

Dineshkumar
  • 4,165
  • 5
  • 29
  • 43