how to generate a stream of raw data?
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.
精彩评论