Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8565121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:21:08+00:00 2026-06-11T17:21:08+00:00

My ServerSocket listens to LAN Connections and accepts them well, but when I try

  • 0

My ServerSocket listens to LAN Connections and accepts them well, but when I try to connect to the same through my Phone – using the 3G connection – it doesn’t seem to connect.

  1. I tried using getMyIP site to get the IP and try to connect to it, it does get the right IP (checked with my router) but then no connections are accepted at all.

  2. I tried opening the port on windows 7 and on my router altogether.

  3. I put those lines in my Server constructor:

    ss = new ServerSocket(port);
    host=ss.getInetAddress().getHostAddress();
    

    and I get the ip on host to 0.0.0.0

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:21:10+00:00Added an answer on June 11, 2026 at 5:21 pm

    You need to have a public IP address. If you have a router it must pass traffic for the port you want to expose to the internet to your machine. If you have a firewall, it must allow external connections to this port.

    All the changes you do are the same regardless of language you use and there is nothing you can do from Java to work around needing to do these things.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an java application using Socket TCP/IP and GUI. Server always listens connection
I am currently listening on a port using BufferedReader like: ServerSocket ss = new
I'm implementing a java TCP/IP Server using ServerSocket to accept messages from clients via
Now I want to use a serversocket to listen port x, in the same
I am designing a client server socket program using TCP/IP. The server listens on
So I've got a thing like this: try{ServerSocket acceptor = new ServerSocket(4782);} catch(IOException e){System.err.println(ERROR:
I have a server that listens for a connection on a socket: public class
I have server application that listens for clients. Let's client lost internet connection and
Although ServerSocket class is designed to generically listen for incoming connections, Can I just
My programme listens for just one connection once... the programme just gets stuck at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.