开发者

how to generate a stream of raw data?

开发者 https://www.devze.com 2023-01-27 12:32 出处:网络
Tools: OS: Win XP, MSVC++ The problem is that I want to generate some \"raw data\" stream, by that I mean a stream of random 1s and 0s, next I want to send this genrated stream over udp sockets.

Tools:

  • OS: Win XP,
  • MSVC++

The problem is that I want to generate some "raw data" stream, by that I mean a stream of random 1s and 0s, next I want to send this genrated stream over udp sockets.

any ideas on how to generate that stream?

I hope I was clear in my questi开发者_Python百科on and thanks in advance


Since you're using UDP, you're not really going to get a "stream", because UDP is not a stream-oriented protocol like TCP. You can generate lots of random UDP packets, however. Just generate random integers with rand() or whatever and send them over UDP.

0

精彩评论

暂无评论...
验证码 换一张
取 消