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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:33:56+00:00 2026-06-15T17:33:56+00:00

I had my socket connection working, but the server was updated to SSL. I

  • 0

I had my socket connection working, but the server was updated to SSL. I call this method:

[socket startTLS:nil];

Bu I still can’t make a secure connection with the server. I initiate the connection like this:

- (void) initNetworkCommunication {

    dispatch_queue_t mainQueue = dispatch_get_main_queue();
    socket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:mainQueue];

    NSError *err = nil;
    if (![socket connectToHost:@"192.168.2.210" onPort:1333 viaInterface:@"" withTimeout:-1 error:&err]) // Asynchronous!
    {
            // If there was an error, it's likely something like "already connected" or "no delegate set"
        NSLog(@"I goofed: %@", err);
    }else
    {
        NSLog(@"Connecting...");
    }
    [socket readDataWithTimeout:-1 tag:1];

}

Can you help me with that?

  • 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-15T17:33:57+00:00Added an answer on June 15, 2026 at 5:33 pm

    I was calling the [socket startTLS:nil] after make the initNetworkCommunication, but it should be at the moment that we make the connection, like this:

    - (void) initNetworkCommunication {
    
        dispatch_queue_t mainQueue = dispatch_get_main_queue();
        socket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:mainQueue];
    
        NSError *err = nil;
        if (![socket connectToHost:@"192.168.2.210" onPort:1333 viaInterface:@"" withTimeout:-1 error:&err]) // Asynchronous!
        {
                // If there was an error, it's likely something like "already connected" or "no delegate set"
            NSLog(@"I goofed: %@", err);
        }else
        {
            [socket startTLS:nil];
            NSLog(@"Connecting...");
    
            }
            [socket readDataWithTimeout:-1 tag:1];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've had my socket class working for a while now, but I wanted to
I had my server working with an earlier version of node.js, npm, and socket.io
I had this working previously, but I didn't understand how, so I'm attempting to
I've had this working for months but I had a power cycle today and
Had a good read through similar topics but I can't quite a) find one
Had a good search here but can't see anything that gets my mind in
Had this working; at one stage. The problem is the following text is now
I'm working on a socket based client-server app. When a user running any iDevice
I have had many problems in Django (not all of them solved), but this
i had made the following programming for client server programming but it is not

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.