I'm new to network programming and have to write a tool that runs on Windows and communicates with a Linux box over the network. The linux box has a TCP/IP server setup using c++ with boost.
My tool in Windows needs to connect. For the Windows side, I am writing the tool in C# and looked at this tutorial: http://www.codeproject.com/Articles/10649/An-Introduction-to-Socket-Programming-in-NET-using
Basically, the linux box is going to send packets with "event data" to the Windows client at certain times. What's the best way for the client to wait for incoming data? The tutorial above uses a while loop to send/receive data over the network stream. But is just looping and continuously polling for a packet the right design?