I have a problem.. The main idea of my project is a server that accept client connections and everytime someone connects it checks if the client is available for reading or for writing with select() function.
If is ready for writing then is send a buffer.. Well, this is a sample of code..
the problem is that the server althougt is was supposed to send the msg only 1 time it is send it 10-15 times... it is like finds the client client all the time available for writing ( maybe i am doing sthng wrong with select and fds?).. Also the client exiting with segmentation fault JUST AFTER the printf function and i dunno why.. i suppose it is from the "oversending" of the packets from the server
What should i do ? Thanks in advance..
(i compiled it with gcc on Ubuntu distro)
The first thing you have to do is edit your post to add Code tags around code snippets and proper code indentations inside the snippets. Otherwise your "code" is absolutely unreadable.
Bookmarks