• 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: Cancelling socket operations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cancelling socket operations


  • Subject: Re: Cancelling socket operations
  • From: Peter Sichel <email@hidden>
  • Date: Mon, 5 Aug 2002 09:49:10 -0400

At 12:25 PM +0100 8/2/02, Tom Bayley wrote:
Hello all,

I'm trying to improve the way we manage things like time-outs and abort requests in our TCP I/O classes. I think I've sussed the time-out options - but I'm still not sure how to abort. I mean the sort of situations where the user has decided a connection attempt will fail and he/she/it doesn't want to hang around for the time-out. Or perhaps the other end stops sending and again the user wants to short-circuit the time-out.

What this seems to boil down to is some way of aborting select(). I need to support threads so I don't really want to use signals, especially since OS X doesn't appear to implement pthread_kill(). So what is the recommended solution? Can I just close the socket from another thread?

Tom

What I do is create a dummy pipe and include the output socket in the
corresponding select(). Then if I need to abort the select(),
I just write to the other end of the pipe so the select() returns
with data for my dummy socket.

- Peter
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Cancelling socket operations (From: Tom Bayley <email@hidden>)

  • Prev by Date: Re: How to create dial-up settings in OS X 10.0?
  • Next by Date: OpenTransport and OS/X
  • Previous by thread: Cancelling socket operations
  • Next by thread: OS X: PPP escapes over USB DSL modem
  • Index(es):
    • Date
    • Thread