• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Socket networking

I'm trying to set up a basic network connection using droids but I'm having problems.

my server program:
Code:
ServerSocket ss = new ServerSocket(8888);
                while(!end){
                        //Server is waiting for client here, if needed
                        Socket s = ss.accept();
.....
Client program:
Code:
try {
            Socket s = new Socket(*my ip address*,8888);
.....
the server runs until it reaches ss.accept() like it should but the client still can't connect. The client usually times out and nothing happens

I'm running both these programs using eclipse on my computer. I set the premissions in the manifest for both programs to let them use the internet and I have the port forwarding so I don't think that's the problem either.

Can anyone help me?
 
External and I have my router set up to forward the port 8888 to my internal one. I've gotten this to work before when I was working with python code so I'm doubtful that it's my problem now.

Soon I'm going to try to get eclipse set up on my laptop and see if the two programs will connect when running on separate computers. I'm not sure if eclipse just doesn't like running to programs on the same computer.
 
Back
Top Bottom