Hello! i'd like to make a little chat program, with more users, but i don't understand the usage of 'select'. if sombody can, please send me a sample program for tasm with comments, how to detect client connections thanx nick
What often goes wrong is that people don't supply a pointer to an FD_SET structure but the actual socket handles instead. Maybe you've done this right, but if not here's how it should work: Give select a pointer to an FD_SET structure, which is just an array of socket handles, but preceded by a DWORD that indicates the number of handles in the array. It should work fine then. I don't have source code for you and I don't think you will get much TASM source code as this board is focused at masm. But there's source code for a chat program at this site: http://titiasm.cjb.net. Thomas
I have'nt really used select() before but I know that one of it's great use is it drives (commonly) winsock's multithreading capabilities.