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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:13:08+00:00 2026-05-24T20:13:08+00:00

In my application, we need to have socket communication with the server, and through

  • 0

In my application, we need to have socket communication with the server, and through googling and Apple documentation, came across following

1 — NSStream Class
2 — CFSocket

I am bit confused, it looks like NSStream is wrapper on top of CFSocket class, more over, i need to have Secure Socket Communication, and i went ahead using NSStream / NSInputStream and NSOutput stream,

Entire Application was previously using OpenSSL and now it has to go with Native SSL,can anyone help me to point correct direction,

— Should i go ahead with NSStream or any other framework is available in Cocoa,

— if NSStream is there, it has got poll and run-loop which is most preferred,

— Is there any example available that i can refer,

Thanks in Advance

  • 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-24T20:13:10+00:00Added an answer on May 24, 2026 at 8:13 pm

    Using NSStream is probably the best solution as you don’t have to care about every detail. Furthermore, the run-loop way is better as it checks whether there’s data to read so you don’t have to do it.

    Generally, it’s a good idea to use the highest level abstraction available and only dive lower-level if you really need to. Network programming can sometimes be tricky to do correctly and fast, and Cocoa does a good job of handling this for you.

    See the NSStream: TCP and SSL blog post on how to establish an SSL connection with NSStream. While it aims at iOS, it should apply equally to Mac OS X in this case as I haven’t spotted any iOS-specific code or concept in the blog post.

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

Sidebar

Related Questions

I need to develop a server side application that opens sockets and manages communication
I have this flash application that opens a socket connection with a server. What
I am trying to conceptually work through a model for a client-server socket application
Need to create a client server application, both have to communicate with Database. Which
We are creating an XBAP application that we need to have rounded corners in
I need to have a single instance application (as per this answer ), but
I need to have a Win32 application load a hard coded AES-256 key, ideally
I have two application that need to talk to each other. App1 needs to
I have an application I need to analyze. I have the source code here.
I have this application that need to do some things in protected paths (like

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.