When I am trying to reuse the socket address this error is coming. I googled it and i got from this link BIND ERROR : Address already in use
that i should call
setsockopt(SO_REUSEADDR)
but after doing this its not working fine.
Thanks in advance. 🙂
Even when using
SO_REUSEADDRyou can’t have multiple bindings to a single address/port pair, that’s not whatSO_REUSEADDRdoes.See e.g. this link for a good explanation of the flag.