Jump to content

Reliable UDP Protocol Implementation in Java - Why does this happen?

- - - - -

  • Please log in to reply
2 replies to this topic

#1
liamzebedee

liamzebedee

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
Please see http://stackoverflow...oes-this-happen

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java

Quote

and it appears that its something associated with packets not being removed from the receive queue
Take a look at this (Mainly post 4):http://forum.codecal...feredimage.html

That was also with using sockets and objects send trough them remaining in the buffer, eventually causing problems.

If this is not helping, could you post the stacktrace or at least the name of the error?

#3
liamzebedee

liamzebedee

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
Thanks so much, I have been stuck on this for the whole day.

I read through the thread and found the part about using InputStream.reset(). It wasn't supported in the code I was using, but thankfully, I knew exactly how many bytes was in each of the packets. This cleared the buffer successfully, and it now works. THANKS :D




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users