Results 1 to 2 of 2
Thread: Dealing with DatagramSocket
- 04-07-2012, 01:42 AM #1
Member
- Join Date
- Apr 2012
- Posts
- 1
- Rep Power
- 0
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!Last edited by fabiolanza; 04-07-2012 at 01:46 AM.
- 04-07-2012, 02:14 AM #2
Re: Dealing with DatagramSocket
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.the error I am getting: java.lang.NullPointerExceptionIf you don't understand my response, don't ignore it, ask a question.
Similar Threads
-
DatagramSocket problem when using IPV6
By marcojrfurtado in forum NetworkingReplies: 0Last Post: 10-04-2011, 04:26 PM -
Dealing With Videos Java
By anthropamorphic in forum New To JavaReplies: 15Last Post: 07-05-2011, 06:20 AM -
Dealing with IndexOutOfBoundsExceptions
By MrDave in forum New To JavaReplies: 4Last Post: 06-19-2010, 01:33 AM -
dealing with (zip) files
By aloula in forum Advanced JavaReplies: 4Last Post: 10-06-2009, 07:32 PM -
Dealing with iReport 3.0.0
By HotEvilGirl in forum New To JavaReplies: 6Last Post: 09-11-2009, 11:32 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks