This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes making client/server connection within the same network? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "making client/server connection within the same network?" Watch "making client/server connection within the same network?" New topic
Author

making client/server connection within the same network?

Aadesh Nguyen
Greenhorn

Joined: Jul 14, 2011
Posts: 3
Sorry if the title confused you. What I was wondering is whether there is a way to make a server/client connection using one computer without using "localhost"? I thought I could do it with VirtualBox, but the virtual machine and the host machine end up having the same IP address. If we could not do it with a computer, how about two computers but using the same network?

Thanks in advance,
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19230

Aadesh Nguyen wrote:Sorry if the title confused you. What I was wondering is whether there is a way to make a server/client connection using one computer without using "localhost"? I thought I could do it with VirtualBox, but the virtual machine and the host machine end up having the same IP address. If we could not do it with a computer, how about two computers but using the same network?

Thanks in advance,

As far as Windows is concerned, the VirtualBox virtual machine is a different computer. In your case they share the same IP address because that's probably how you set them up. You can also use bridge-mode networking for the virtual machine, which means that the virtual machine will use the same physical network card as usual but will get a different IP address.
Because you now have the two machines share the same IP address, Windows has no way whatsoever of communication with the virtual machine through the network. If you try to connect to "localhost" or to the IP address, it will connect to itself.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: making client/server connection within the same network?
 
Similar Threads
Client Server communication
How to disconnect client question
client and database URLyBird
Weird problem with rmi
To know termenology