Click to See Complete Forum and Search --> : Can I/O make it so an application misses TCP(UDP)/IP messages?


lab1
October 21st, 2004, 10:11 AM
Hello all,

I have 4 console applications talking to one another.. and they all have a lot of cout's in them, so they are always printing to the windows.

the way they communicate is UDP, and they are all running on the same machine..

now, Ive noticed that certain times, some of them are missing the UDP/ip messages to each other.. I know the messages are making it out to the network though, because some of the applications see them, but them one or two might not.

Ive noticed that if I cut out all the cout's, that this doesnt happen anymore..

could the I/O (couts) be affecting the UDP messages?

Thanks!

cilu
October 21st, 2004, 10:19 AM
Well couts take time. But the question is how is your application designed? Is it single-threaded, or multi-threaded? How do you send and receive messages?

lab1
October 21st, 2004, 10:39 AM
its single threaded.. message are sent on the network via UDP/IP using the DIS protocol. The application actually use a network interface called VRLINK from MAK technologies.

Any ideas?

earla234
October 21st, 2004, 11:31 AM
First thing UDP messages are not Guarenteed.
I dont know how are listening for the messages in a Single threaded Application. If your Sockets are Non Blocking there is every chance of missing the packets.

Post a Chunk of Code.. it Might Help..

kuphryn
October 21st, 2004, 12:11 PM
Threading should not affect the I/O given that everything is processed in a sequential order.

Describe its design. In this case, there is one loop in the main thread, correct?

Kuphryn

Andreas Masur
October 21st, 2004, 12:47 PM
[ Moved thread ]