   SDL_net
  I am new to networking coding, so bare with me....If I want to have my chat window update in real time will I need to run a separate thread to allow it to update while I am able to go about other business? and if you know of any good tutorial sites for the SDL_net code e.g. a decent implementation I would appreciate it.Thanks   
  There is no need for multiple threads. What you need to do is use socket polling. Periodically check for events in socket (message received). You can do it with SDL using SDLNet_SocketSet. Create it, add sockets to it (SDLNet_TCP_AddSocket), and then call SDLNet_CheckSockets with timeout 0 to check if socket has new data arrived. If yes, then read bytes from socket (it wont block your thread). If not, then don't call read.;  As bubu LV said threads aren't necessary and the methods he mentioned will work fine especially for a simple chat window.If you like handling events more than polling then I have had some luck with the net2 library by Bob Pendleton. It uses threads but also allows you to handle sockets similar to SDL keyboard events.   ;Quote:Original post by bubu LVThere is no need for multiple threads.In fact, multiple threads will vastly increase the complexity of your code, and if you need multiple connections, may degrade performance as well.@Mars: you generally want to use some form of asynchronous connections. libevent is a good choice for simplicity, and boost::asio while more complicated, is very solid as well.   ;  Thanks for the info! I will check into it this weekend.   