• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SSLRead() causes SSLWriteFunc to be called?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SSLRead() causes SSLWriteFunc to be called?


  • Subject: Re: SSLRead() causes SSLWriteFunc to be called?
  • From: David Francis <email@hidden>
  • Date: Thu, 6 Oct 2005 16:31:38 -0500

Thanks Fred. Since both SSLRead() and SSLWrite() take my SSLContextRef, does this mean that I need to use a semaphore or lock to prevent these functions from being called at the same time from different threads?

Thanks,

David Francis
President
Francis Technical Services, LLC


On Oct 6, 2005, at 2:40 PM, Frederick Cheung wrote:

While you can definitely use SecureTransport in a multithreaded
worlds, accessing the same SSLContext from more than one thread is
probably not a good idea.
Fred

On 10/6/05, David Francis <email@hidden> wrote:

I am just beginning to work with the Secure Transport APIs.  I have a
setup which has a BSD socket opened and the SSLHandshake() on the
main thread thread.  Once the initial handshake is complete, I start
a 2nd thread to read() the incoming bytes from the server.  This 2nd
thread basically blocks until some incoming data is available from
the server.

Strangely, when my 2nd thread calls SSLRead() my SSLWriteFunc
callback is being hit.  I have a breakpoint in my SSLWriteFunc and
the stack trace shows that only SSLRead() is being called on the 2nd
thread.

Am I doing something wrong?  How are people using Secure Transport in
a multi-threaded environment?

Thanks,

David Francis
President
Francis Technical Services, LLC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >SSLRead() causes SSLWriteFunc to be called? (From: David Francis <email@hidden>)
 >Re: SSLRead() causes SSLWriteFunc to be called? (From: Frederick Cheung <email@hidden>)

  • Prev by Date: Re: NSURLConnection: setting Connection: close HTTP header
  • Next by Date: CSocket callback keeps giving my Data instead of Read
  • Previous by thread: Re: SSLRead() causes SSLWriteFunc to be called?
  • Next by thread: CSocket callback keeps giving my Data instead of Read
  • Index(es):
    • Date
    • Thread