samuelkarp/CS-114 — comment on commit ada93afbcbda007ef8f862fac60f98e961282e97
File: cpp/servent.cpp line 106
By samuelkarp:

I don't think this does what you intend it to do. The way you've written it now, if the socket is not ready it just _skips_ the `sendData()` or `read()`. Since `sendData()` forks and then blocks on the child process until the socket is ready, you probably don't need to check whether the socket is ready here. With respect to `read()`, that should probably be polled during the infinite loop where it checks on all current sockets...