Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

server socket ip address problem

Options
  • 04-02-2012 4:49pm
    #1
    Registered Users Posts: 1,180 ✭✭✭


    Hi, I am running a serverSocket(port 4242) on an android phone(in java). a PC or another android device has the ip address of the server phone and wants to connect to the socket.

    however the connection never gets made.
    I think this is because the ip address is probably for the router in which the server phone is connected via wifi, and the router does not know the DHCP address of the phone.

    I am just wondering if there is a way to programatically solve this problem. i can't expect users to port forward their phone on every router the connect to via wifi


Comments

  • Registered Users Posts: 1,477 ✭✭✭azzeretti


    EyeSight wrote: »
    Hi, I am running a serverSocket(port 4242) on an android phone(in java). a PC or another android device has the ip address of the server phone and wants to connect to the socket.

    however the connection never gets made.
    I think this is because the ip address is probably for the router in which the server phone is connected via wifi, and the router does not know the DHCP address of the phone.

    I am just wondering if there is a way to programatically solve this problem. i can't expect users to port forward their phone on every router the connect to via wifi

    Unless the server and phone are on a different network (across WAN/VLAN etc) then the router shouldn't come into it. Are you testing on a local network?


  • Registered Users Posts: 7,157 ✭✭✭srsly78




  • Registered Users Posts: 1,180 ✭✭✭EyeSight


    i was testing on a local network and that worked fine. however when i try it on the internet it no longer works. it will need to work on the internet, not just a local network


  • Registered Users Posts: 2,022 ✭✭✭Colonel Panic


    That is where uPnP comes in...


Advertisement