Results 1 to 1 of 1
Thread: UDP Receive Problem
- 04-27-2010, 10:56 AM #1
Member
- Join Date
- Apr 2010
- Posts
- 3
- Rep Power
- 0
UDP Receive Problem
Hi All,
I have a UDP 'server' setup to continuously listen for UDP datagrams.
This uses DatagramSocket to listen on the port, and specifies a DatagramPacket with a buffer size of 65535 to receive.
When I send small amounts of data, this has been working fine. When I send larger amounts, which are larger than one datagram, I have problems. The first datagram is received which contains part of the message, but the second datagram does not seem to be received until I send more data to the server.
It is as though it is waiting for the full buffer to be filled before the second datagram gets processed. But as the smaller packets are received without problem then this doesn't make sense.
Am I doing something wrong, or is it in theory correct to loop on receiving UDP packets set to a buffer of their max size? Note I have tried using a smaller buffer but then the packets are chopped and data is lost.
Thanks in advance for any help,
Debbie
Similar Threads
-
receive code
By amita110486 in forum New To JavaReplies: 3Last Post: 03-17-2010, 03:07 PM -
How to receive mail using JMS
By ashoksaravanan in forum Web FrameworksReplies: 1Last Post: 02-22-2010, 10:11 AM -
How to send and receive SMS to and from JSP
By ashrafraheem in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 09-27-2009, 02:16 AM -
Java code that allows me to make and receive calls, send and receive sms
By nareshbabu@live.in in forum NetworkingReplies: 0Last Post: 12-02-2008, 10:55 AM -
Servlet that receive n parameters
By Felissa in forum Java ServletReplies: 1Last Post: 06-07-2007, 07:22 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks