Sign in to follow this  

[java] Bypassing Fire Wall and Router Prot forwarding

This topic is 3663 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Original post: what if i set up so the server monitors but doesn't receive/transmit all the data, as in client to client connection, then the question is, port forwarding how would i get around that in java? because then i can just use the computer(server) to review whats going on so i know if someone breaks the rules or whatever, but i need a way to make it so the user *edit not here not doesn't* have to forward their ports, especially for the nontechnical, or like me not being able to so i set up server at grandmother's place... any ideas on this one?? or any criticism about how this would be the worst idea? (only really good reasons please) Extra Info: this is for a game server/client trying to use ports for communication to and from clients and also server

Share this post


Link to post
Share on other sites
I barely understood your question (if there was one at all =), but let me try to help you..

If you're doing a client/server application in Java, you're most likely going to use Java NIO nowadays, instead of "standard" (synchronous) network IO. That said, you have a few options up your sleeve: either you do all the channel setup code yourself, and plan for the usage of different channels representing different ports, to receive NIO messages (byte buffers) depending on the read/write events you receive on your selection keys, or...

You use a damn good higher level framework to deal with all of that, such as Apache MINA or the Grizzly. I've been toying with MINA for a long while, and it's very simple to use. Grizzly is damn powerful, but I've not worked with it yet. It is the base of the Glassfish Java EE 5 Application Server, and so it speaks for itself ;)

As for where to get information on how to use NIO... plenty of tutorials out there. One of the members here, 'blablabla' (on javagaming.org, not sure which nick name he uses here) has written a very good one in the past. You may find it if you search at javagaming.org

Share this post


Link to post
Share on other sites

This topic is 3663 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this