Results 1 to 4 of 4

Thread: how to stop and start a UDP stream?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    107

    how to stop and start a UDP stream?

    I have an app that reads an incoming data stream from a UDP port. The datastream is in the form of a single string, with line separators. I simply need to read the last line of the string, in order to get the latest data.

    However, as the string continues to build, it takes longer to get to the last line, since the size of the stream is increasing continously. What I want to be able to do is stop the incoming stream, and then restart it, every 5 minutes or so. What this would do is, it would restart the stream fresh after each restart.

    What are my options for this? What command can i use to stop/restart an incoming UDP stream? Obviously i want the interruption to be as small as possible, since i dont want to miss data. Any ideas?

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: how to stop and start a UDP stream?

    What are you receiving the UDP stream from? A program you made? Another program?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    107

    Re: how to stop and start a UDP stream?

    Im receiving the stream from a stock trading application. The application sends a UDP stream of the latest price quotes.

    I want to be able to read the last line of the stream, since that contains the latest quotes, and then post it to a text file. But then i want to stop the stream and restart it every 5 minutes, in order to keep the size of the stream in check.

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: how to stop and start a UDP stream?

    Do you have any control of where the stream starts? Or does it always start from the beginning?

    I've only made a couple UDP programs, everything else I do is TCP/IP.

    Are you using Visual Basic 6 or .NET? Winsock control? API?

    In VB6 with Winsock you can just close the socket and I think that will stop the stream, even though there is no real 'connection' made since it's UDP.

    Then after 5 minutes send another request for the stream.

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