Dealing with DatagramSocket
Hello guys,
I have a server receiving new DatagramPackets through DatagramSockets.
For each received DatagramPacket, I send them to a new thread do to some calc and then I send the reply to client.
In order to reply to client, I am also sending the instance of DatagramSocket as parameter to this calculator thread, so I can use it to reply to client, but it`s not working.
Does anyone knows the best way of doing this?
This is the error I am getting: java.lang.NullPointerException: null buffer || null address
Thanks a lot!
Re: Dealing with DatagramSocket
Quote:
the error I am getting: java.lang.NullPointerException
Please post the full text of the error message. Be sure the catch block calls the printStackTrace method so you get the line number where the error occurred.