PAULUS, Raimund, TI-ABN wrote:
Hi Mark,
as Corinna wrote in the thread " Cygwin socket option SO_REUSEADDR operates unlike
Linux", the cause for the problem in libtirpc is Microsofts implementation of socket
handling. If i implement a simple socket client, that is not so much of an issue, because
I call the functions separately and can handle the error. Moreover in this case bind() is
not necessary.
But in the case of libtirpc the implementation of clnttcp_create() determines
the sequence of bind() and connect() for the local port and you cannot correct
the error of bind() after the call of connect(). Therefore I think best is to
set the port number to zero (port = 0) before the call to bind().
Raimund
-----Ursprüngliche Nachricht-----
Von: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com] Im Auftrag von
PAULUS, Raimund, TI-ABN
Gesendet: Dienstag, 9. Januar 2018 09:14
An: cygwin@cygwin.com
Betreff: WG: AW: RPC clnt_create() adress already in use
[...]
Hi Raimund,
Where, exactly, would you set the port number to zero? I can imagine how this
would solve the problem you're seeing but I'm concerned about other use cases.
It also seems a little odd to me we'd be making a Cygwin-specific patch rather
than "fixing" Cygwin itself so the patch would not be necessary. But I don't
feel strongly either way here. libtirpc already has Cygwin-specific patches.
..mark
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple