On 09 Mar 2012, at 16:56, Philippe Marschall wrote:

> On 03/09/2012 04:44 PM, Sven Van Caekenberghe wrote:
>> Most socket API's allow for the creation of a server socket on the next 
>> available port, often by specifying 0 instead of a port. When the socket is 
>> bound, one can retrieve the local port and let the client(s) know. I tried 
>> to do that in Pharo today, and these steps seem to work, by accepting an 
>> incoming connection gives a primitive failed.
> 
> Stupid n00b question, isn't 0 a valid port number?

I don't think so, in Java:

http://docs.oracle.com/javase/1.4.2/docs/api/java/net/ServerSocket.html#ServerSocket()

ServerSocket

public ServerSocket (int port) throws IOException

Creates a server socket, bound to the specified port. A port of 0 creates a 
socket on any free port.

[…]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to