Binding of a server socket to an address that is not a localhostaddress
Dear Experts,
I have been using Sockets to establish communication between the 2 classes.
I have a class x1 which is reqd to communicate with either one of the several receiving classes a1,a2,a3...
Currently, i'm biniding the server sockets of the receiving classes, to different ports, and am passing the port mumber as a parameter to the x1 class..
So the socket in x1, and that particular server socket bound to the respective port will be in communication.
=> Is it possible for me to use ip addresses instead of ports?
=> I tried to bind a server socket to an address which wasn't the localhost address. I'm getting an exception,
" java.net.BindException: Cannot assign requested address: JVM_Bind "
Is it not possible to do so?