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

  • Home
  • SEARCH
  • 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 8899343
In Process

The Archive Base Latest Questions

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

Currently I’m developing an application which can send multiple files to other device over

  • 0

Currently I’m developing an application which can send multiple files to other device over Wi-Fi using bonjour service same as developer.apple Wi-Tap application did. Only one difference is ,I’m sending files where Wi-Tap sending strings.

Now I would like to handle the Wi-Fi connection issues like connection loss in my application.

I can handle the NSStream Errors through handleEvent delegate for below cases

 NSStreamEventErrorOccurred 
 NSStreamEventEndEncountered

However I’m Unable to find the Wi-Fi connection loss through this delegate. So the possible solutions in my mind is using the Reachability class for checking the wi-fi connection in a background thread. However it’s a bad practice and it consumes more battery power of device.

So is there any other way to track the Wi-Fi connection of the device during the file transfer ?

  • 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-15T00:49:56+00:00Added an answer on June 15, 2026 at 12:49 am

    One way around is to use use NSNetService

    As this is just a service publishing tool it won’t interfere in your data transfer so you just have to use

    -(void)publishNetwork
    {
    //---publish the service---
    netService = [[NSNetService alloc] 
                  initWithDomain:@"" 
                  type:BonjourServiceName 
                  name:@"" 
                  port:portNo];
    netService.delegate = self;
    [netService publish]; 
    
    }
    

    You have to run this in

    [netService scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
    

    if Wifi is on then this will be fired

    - (void)netServiceDidPublish:(NSNetService *)sender
     {
        NSLog(@"Service did publish:%@",sender);
    
     }
    

    if there is no wifi

    -(void)netService:(NSNetService *)aNetService didNotPublish:(NSDictionary *)dict 
     {
       NSLog(@"Service did not publish: %@", dict);
    }
    

    These are the delegates of NSNetService you can refer the library .
    This is just a way around your problem hope it helps.

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

Sidebar

Related Questions

Currently I am using HTML files for parts of my user interface. I display
Currently I am using Amazon Cloudfront to service static objects on my ASP.Net MVC3
Currently I have a web service, which loads up any plugins located within its
Currently writing a C# application it should do backups using GIT in the background.
Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
currently, I`m implementing a map App with Mono4Droid and there I`m using a WebView
Currently I have 2 ways of displaying images in a cell, which way will
Currently i have a node.js and socket.io application in development on my local machine
Currently I have a web service running in a tomcat (http:// localhost:8080/myApp/getUsers ). My
Currently I am loooking for a way to develop an algorithm which is supposed

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.