> Trying to setup a vm server which accepts incoming connections. Is
> there a way of limiting the range of clients ports used by the vm
> during the connection creation with the connecting clients?
No, you need to accept all incoming connections, but you can close the
ones you don't like based (for example) on Socket.getPort(). I wonder
however what added value this has, considering the complexity it adds
to the client.
The only thing similar to what you are asking is to bind your
ServerSocket to a specific local address, which lets you restrict what
network your clients can connect from.
/gordon

Signature
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
Hung - 27 Feb 2007 18:28 GMT
Sorry, I really meant the socket created via the accept() of the
connection from the client application.
So the socket on the same vm running the serversocket.
> > Trying to setup a vm server which accepts incoming connections. Is
> > there a way of limiting the range of clients ports used by the vm
[quoted text clipped - 14 lines]
> [ don't email me support questions or followups ]
> g o r d o n + n e w s @ b a l d e r 1 3 . s e
Gordon Beaton - 27 Feb 2007 19:02 GMT
> Sorry, I really meant the socket created via the accept() of the
> connection from the client application. So the socket on the same vm
> running the serversocket.
Every Socket returned by ServerSocket.accept() uses the *same* local
port as the ServerSocket it came from.
Maybe you could try to describe what problem you're trying to solve,
instead of how you hope to solve it.
/gordon

Signature
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e