• 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: Moving from OT to sockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving from OT to sockets


  • Subject: Re: Moving from OT to sockets
  • From: Frederick Cheung <email@hidden>
  • Date: Tue, 19 Oct 2004 20:15:27 +0100


On 19 Oct 2004, at 20:06, email@hidden wrote:

Date: Mon, 18 Oct 2004 22:33:48 +0100
From: Mark Thomas <email@hidden>
Subject: Moving from OT to sockets
To: Macintosh Network Programming <email@hidden>
Message-ID: <BD99F54C.D5A8%email@hidden>
Content-Type: text/plain; charset="US-ASCII"

Hi,
  I'm starting the process of finally moving some code from good old
OpenTransport to BSD Sockets, but I wanted to ask in how the best way
forward.

As a lot of the code and structure it would be easier if I move the OT
code into class structure where I could choose between OT or BSD sockets so
I can keep alive the Classic side of things, while moving the BSD sockets to
take advantage of the new functionality.


One thing I have been wondering about how would the best way to handle the
OT concept of Notifiers as in MacOS-X they're really just an separate thread
of execution, so I'm wondering if calls which which should be asynchronous
should just create another thread and then execute what they need so they
will block that thread and leave the other main thread free.


Is this sort of thing which happens now or does OT use some more clever
parts of BSD Sockets, as I would be a bit newbie there. Should I thinking of
other stuff maybe ???.


I'd use CFSockets, which are a thin wrapper round a bsd socket (which you can get at if you need) that allow you to add the socket to a run loop. Your callback then gets called for events like "you can read from the socket" or "you can write to the socket". You could also use CFStream.

Fred

_______________________________________________
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


  • Prev by Date: Moving from OT to sockets
  • Next by Date: Questions on URL Access Manager
  • Previous by thread: Moving from OT to sockets
  • Next by thread: Questions on URL Access Manager
  • Index(es):
    • Date
    • Thread