CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2001
    Posts
    1,029

    Can I/O make it so an application misses TCP(UDP)/IP messages?

    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!

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Can I/O make it so an application misses TCP(UDP)/IP messages?

    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?
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  3. #3
    Join Date
    Apr 2001
    Posts
    1,029

    Re: Can I/O make it so an application misses TCP(UDP)/IP messages?

    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?

  4. #4
    Join Date
    Oct 2004
    Posts
    9

    Re: Can I/O make it so an application misses TCP(UDP)/IP messages?

    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..

  5. #5
    Join Date
    Feb 2002
    Posts
    5,757

    Re: Can I/O make it so an application misses TCP(UDP)/IP messages?

    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

  6. #6
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: Can I/O make it so an application misses TCP(UDP)/IP messages?

    [ Moved thread ]

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured