Dear Phil,
Thanks. I modified this code from an open-source
program segment. I believe the reason it is
written this way (but not just calling recv or recvfrom
without select) is to give a chance for the program
to get other signals and serve them between select()
(when some messages have arrived) and recvfrom()
(to get the actual message). If we just have written
recvfrom() without select(), but using BEGINCS (which
blocks other signals) before recvfrom() to prevent
message from being interrupted, there is no chance
for the signals from being served. This is just my
understanding on why the program is written that way.
After prolonged debugging efforts, I've just found out
the problem of the code. The error is due to a wrong
value of maxackrfd being passed in select().
--
LaBird (Benny).
Email: Pls remove all nos. from my above email addr.
"Phil Frisbie, Jr." <(E-Mail Removed)> wrote in message
news:SasZb.2472$_(E-Mail Removed)...
> select() should always be used with non-blocking sockets. That is a
general
> sockets programming rule.
>
> --
> Phil Frisbie, Jr.
> Hawk Software
> http://www.hawksoft.com
>