Results 1 to 2 of 2
  1. #1
    fabiolanza is offline Member
    Join Date
    Apr 2012
    Rep Power

    Default 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 02:46 AM.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Dealing with DatagramSocket

    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.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. DatagramSocket problem when using IPV6
    By marcojrfurtado in forum Networking
    Replies: 0
    Last Post: 10-04-2011, 05:26 PM
  2. Dealing With Videos Java
    By anthropamorphic in forum New To Java
    Replies: 15
    Last Post: 07-05-2011, 07:20 AM
  3. Dealing with IndexOutOfBoundsExceptions
    By MrDave in forum New To Java
    Replies: 4
    Last Post: 06-19-2010, 02:33 AM
  4. dealing with (zip) files
    By aloula in forum Advanced Java
    Replies: 4
    Last Post: 10-06-2009, 08:32 PM
  5. Dealing with iReport 3.0.0
    By HotEvilGirl in forum New To Java
    Replies: 6
    Last Post: 09-11-2009, 12:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts