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 8640369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:15:49+00:00 2026-06-12T11:15:49+00:00

Sorry if this has been posted somewhere I’ve been working/looking for days. The Problem:

  • 0

Sorry if this has been posted somewhere I’ve been working/looking for days.

The Problem:

I’m getting SocketTimeoutExceptions when communicating via a peer to peer network with android devices.

Details:

The android devices use their own mobile network and not wifi when this happens(wifi wasn’t designed to work with this anyways).

The android devices successfully get their ipAddress from whatismyip.com.

One device will send the other their ip address via other means than the peer to peer network we’re using.

The ip address of the remote device will come successfully to the local device.

When the local device responds via the peer to peer network a TimeoutException occurs.

What I’ve tried:

Extending the timeout to significantly long periods of time.

Using other android devices.

Notable:

It should be noted that this same peer to peer network has been tested to successfully work amongst PCs(running linux and windows if that matters) on a local area network. Also just tested the peer to peer network across our wired internet connections on our PCs and it definitely works.

My guess:

I’m thinking that the device is hidden by the isp somehow and I’m going to have to write some code to do something similar to nat traversal but I’m not quite sure. But then again if the device is being hidden I should get a connection refused exception.

Any help is much appreciated.

P.S. I’m unable to post code at the moment and even if I could it’s a couple thousand lines of code for the whole process.

  • 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-12T11:15:50+00:00Added an answer on June 12, 2026 at 11:15 am

    What you should try is to effectively debug your connection,the first thing you could do is check isReachable as hinted in android dev even if unfortunately some networks blocks ICMP.

    Another important thing to note is even if you use 3g,your network can still use NAT addresses,and it is very common believe me,so the ip you see on whatsmyip could aswell be a NATed ip.

    Next step i would reccomend is to try to use your app in a hybrid mode,that is one pc and one android device and try to connect to the pc(make sure that one has public ip or atleast forwarded ports) if that works you know for sure it is your mobile carrier.

    If that really proves to be the case,there is nothing you can do except use wifi,or use a local server to establish connection between two peers.

    Also to be noted that p2p networks get stronger the more they grow,you could aswell implement that peers already connected to the network and reachable from the outside help those others to connect to the other peers.You should look up p2p relaying and Hole punching

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

Sidebar

Related Questions

Im very sorry if this has been answered before but I have been looking
I am sorry if this has been posted before. I have searched many websites
Sorry if this has been answered somewhere; I'm not quite sure how to phrase
Sorry if this has been asked and answered in full somewhere. Not sure if
Sorry if this has been discussed somewhere else on stackoverflow (I could not find
Sorry if this has been covered - I've been looking for hours but I
Sorry if this has already been posted, but I have seen many of them
sorry if this has already been posted but I've been through umpteen posts on
I am sorry if this has been already posted or its on internet. I
Good morning! I am sorry if this has been posted before - I could

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.