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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:19:16+00:00 2026-05-27T22:19:16+00:00

I’ve been trying for days now to try and sort this out. Today was

  • 0

I’ve been trying for days now to try and sort this out. Today was another day full of trying things, having my latest attempt just end in failure. Rather than just close it and go off to bed thinking ‘Another day gone of just failing to do this 1 thing.’, I thought i’d ask on here. I’m at my wits end now. CocoaAsyncSocket I can’t get to work, nor do any tutorials or other ‘solutions’ that i’ve found. This is what i want to do:

The user selects from a list a computer or iphone on the wifi network to connect to, which also has the app running. They connect, another button is pressed and data is sent from the first device to the second. The second device can also send things back. It’s a peer to peer network.

Amy help anybody can give me is appreciated. I really just need a simple way to do this, because it’s beginning to not be worth it for the amount it’d be used versus how long it’s taking to implement. But i don’t want to just give up on something like this where I’ve seen the finishing line on numerous occasions but haven’t been able to get past the numerous hurdles.

  • 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-05-27T22:19:16+00:00Added an answer on May 27, 2026 at 10:19 pm

    There are really three parts to your question:

    1. How do I detect WiFi connection (iPhone)
    2. How do I advertize/discover hosts/services?
    3. How do I transfer data between hosts?

    On the low level you can transfer data using a TCP/IP connection (you listen on some port of host A and connect to that host from the host B). However, host B needs to find out about the fact that host A is on the same local network – this is typically done by host A sending broadcast messages (let’s say via UDP) on the local network that identify it so host B can determine the IP address of A so it can connect to it. And finally, on the non-Mac device you may want to start all this only once you detect that the device is on a WiFi network, since it won’t work otherwise.

    Implementing all of the above (except for the data transfer) is not quite trivial, but fortunately Apple provides several tools for this: SCNetworkReachability provides an API that will notify you when the device has joined a Wifi network (iOS only, not needed on Mac OS X). Then service advertizing and discovery can be implemented using Bonjour: you register your own service using NSNetService on one host and the other can call NSNetServiceBrowser to browse the local network for available peers. Finally, you can use streams to transfer the data once you have discovered the desired service. Have a look at the Apple documentation – there is sample code for all the mentioned facilities. I wouldn’t call is simple, but that’s because what you want is technically not quite simple ;).

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.