raequin
May 5th, 2010, 06:49 PM
I am working on an application that communicates with a piece of software (image processing) that only provides UDP. Hence I am using Datagrams. Here's my simple question. For
DatagramSocket.send(DatagramPacket),
what happens to the information if the application on the other end of this message is not calling
DatagramSocket.receive(DatagramPacket)?
I ask because I do not want to use every packet sent by the image processing software. For example, I trigger the processing, causing it to send a DatagramPacket, but I am not interested in that information so I do not call receive(). Then, I trigger it once more, and this time I want the info in the sent DatagramPacket, so I do call receive(). I am wondering if there is a buffer or something holding the first DatagramPacket, because I want to be sure that receive() gets the second set of information and not the first. Hopefully that's a clear enough description. Thanks for reading, please let me know any info you have on this.
DatagramSocket.send(DatagramPacket),
what happens to the information if the application on the other end of this message is not calling
DatagramSocket.receive(DatagramPacket)?
I ask because I do not want to use every packet sent by the image processing software. For example, I trigger the processing, causing it to send a DatagramPacket, but I am not interested in that information so I do not call receive(). Then, I trigger it once more, and this time I want the info in the sent DatagramPacket, so I do call receive(). I am wondering if there is a buffer or something holding the first DatagramPacket, because I want to be sure that receive() gets the second set of information and not the first. Hopefully that's a clear enough description. Thanks for reading, please let me know any info you have on this.