- Jun 6, 2020
- 11,559
- 4,422
I tried this code (Along with a lot of other things but this works for all three)
B4X:
All return a valid looking IP if they are connected. However if I turn off the WIFI on each device, or don't connect to a router I get the following.
B4X:
Initializing ServerSocket makes no difference and as I understand it is not necessary to get the ip.
I seem to vaguely remember 127.0.0.1 from my bouts with wifi a few years ago on android. That meant you were not connected. But now I get 26.0.28.37?
So, my question is really this:
Is this the code I should be using to verify that the user is connected to a network and if so,
What do I look for to know when they are not connected?
B4i I think I get - if it is 127.0.0.1 then not connected.
B4J - Do I parse it to see if it is in valid ipv4 format?
B4A I am...
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
I seem to vaguely remember 127.0.0.1 from my bouts with wifi a few years ago on android. That meant you were not connected. But now I get 26.0.28.37?
So, my question is really this:
Is this the code I should be using to verify that the user is connected to a network and if so,
What do I look for to know when they are not connected?
B4i I think I get - if it is 127.0.0.1 then not connected.
B4J - Do I parse it to see if it is in valid ipv4 format?
B4A I am...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید