Forum General

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

I need check Ip Address

vivicavivica COMember ✭✭

I need check ip address before calling the service, How could I do this?

Answers

  • kentuckerkentucker USMember ✭✭✭✭✭

    What do you mean by check ip?

  • vivicavivica COMember ✭✭

    I need check Ip if there is connection, before calling services

  • VarunBabuSVarunBabuS INMember ✭✭✭

    hi @vivica there is a plugin \component called Xam.Plugin.Connectivity

    We use below code to check if IP is reachable

    var remote = await Plugin.Connectivity.CrossConnectivity.Current.IsRemoteReachable(remote, port, timeout);

    where remote is IP without port number

    port is port number

    timeout is like if you give it as 5 sec component pings and checks if after 5 sec if no response is achieved we can conclude after 5 seconds the IP is not reachable

Sign In or Register to comment.