Just a follow-up in case anyone else searches for this in the future. In
order to achieve the goal of letting the listener program run in a
continuous loop without having to wait for the wait time to expire, I
found that it is necessary to set the SO_REUSEADDR for both the listen
socket and the socket returned by accept(). Otherwise, the second and
subsequent runs always end up with "Address already in use" on the bind
(until the timer expires).
Thanks a million. I just tested it out. That's what was wrong. I needed
to setsockopt() on the socket that was returned by accept() rather than
the original one from socket(). Now it all makes sense.
THANKS AGAIN! It really helps to have somebody to kick the tires with.
-Marty
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.