Quantcast
Viewing latest article 1
Browse Latest Browse All 3

Answer by Manoj Pandey for Linux TCP server, sending RAW data to few clients every X seconds

Well, I ran your program against a simple TCP client code and did not see any crash. So, you probably should add gdb info to that. Also, in the program, I don't see where your programs wakes up periodically (you do have a comment) and sends data to the client. You should also consider adding the client fd to the list of read fd set and have one common select() call. If the select() returns a read-event on the listener, then that is a new connection and you should call accept. If the select() returns a read-event on a child fd, then you have some data to read adn you should call recv()/read().


Viewing latest article 1
Browse Latest Browse All 3

Trending Articles