[nanomsg] Re: How to bind on a random port?

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Fri, 14 Nov 2014 15:44:03 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You cannot. Just use fixed port numbers.

Martin

On 14/11/14 15:41, xreborner (Shixi Chen) wrote:
> I tried to repeat calling nn_bind on random port. However, it just 
> aborts if the port is already in use, rather than returning
> *EADDRINUSE*. I also tried to use the latest code from github. It
> doesn't abort, but it doesn't return an error code either. Anyway
> to solve this problem?
> 
> Thanks.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJUZhUzAAoJENTpVjxCNN9YSdwH/Rl/PM//WT4aan4UDySHRtEX
ezMo+LgR04dYckF9amSNcNLXdnt6NwUVHOvs/+IeBVhBqyoMgevc4hfB1Kb4iVxQ
/Rrbjlq6/3IWQexfaXON3gjVNfUjTq6jsmVOaKeQa7ev0cTW9UDLb3FHgS3WsLq8
XxKW2WEwWUPSOPTwTejXxZehSVWhcrmuwRvM3UKO+dTjLzk4jfFO5AARDnW2W+6l
5mI8epP2M9kS8BZ6zTUZh8BYN6OhWDDmEVvF32dnB1TXYfB8Jw1h8qN/Q8/RjQmt
0AbOht61n8zkYNOwtEx0bhSEnkUudGHZmoLO0C5GNswkS/t9uBJOYkHqEIapjpo=
=dwWO
-----END PGP SIGNATURE-----

Other related posts: