Alex Sinclair wrote:I've been using Java for a few years now and, until now, I've always felt like I could overcome any obstacle in Java with a little Googling and some trial and error.
Currently all I want to do is to be able to send a message to a server across the internet, have the server process that message,
and then have the server send messages back to multiple clients.
I'm going to post bits and pieces of code rather
When creating the Socket for the server in the client, the host I use is the IPv4 address I get when I run ipconfig. I used port 1982. I don't really know what either of those mean,
When I give that address to a friend across the country running the client, however, absolutely nothing works.
Alex Sinclair wrote:
When creating the Socket for the server in the client, the host I use is the IPv4 address I get when I run ipconfig. I used port 1982. I don't really know what either of those mean, but it worked in testing so I ran with it. I also obtain the same address when I run:
When I give that address to a friend across the country running the client, however, absolutely nothing works. I guess I sort of expected some wizardry to take over and for everything to work out fine by sharing a single IP address, but now I'm back at square one and hours and hours of Googling haven't lead me any closer to an answer. Any help would be appreciated.
Alex Sinclair wrote:Thanks for the replies.
I've looked into port forwarding in Java, but unfortunately I haven't been able to find a clear example for beginners.
Henry, you said that the machine needs to be configured. By this do you mean that user running the client needs to manually change system settings in some way? I was hoping the setup between the person running the server and the person running the client would be a lot easier than that.
I'll explain what I'm trying to do in case there is an easier way that I have not considered. In essence, I want to create an application that would function similarly to a chat room, only instead of chatting, users are simply toggling a busy/available status that is displayed to everyone in the chat room. For example, one user might press a hotkey to toggle into "busy" mode, and then all the other users would receive a message saying that said user is now busy and processes it accordingly. Ideally, the setup for this "chatroom" would be as simple as possible. I was hoping one person could simply host a server, distribute his IP address, and then users could connect to it, like you might when hosting your own Ventrilo server.
Alex Sinclair wrote:I suppose what I'm looking for just isn't possible, as there appears to be more user setup than I would like. For instance, I do not know the login information for my router, and I doubt this would be an uncommon problem. I could probably dig it up, but I barely want to do that - why would anyone else?