• 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
networking advice.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

networking advice.


  • Subject: networking advice.
  • From: Tom Waters <email@hidden>
  • Date: Sat, 20 Oct 2001 14:52:09 -0700

i'm developing an application that is a client for a tcp protocol.

i have code which connects to the server using Socket (from http://sourceforge.net/projects/smallsockets/). obviously when I write data to this socket it sends my protocol to the server, and then when i read, it gets any responses from it. i can be in blocking or in non-blocking mode.

the question is, what's a good appkit model to structure the separation between the network communications and the ui?

here's what i'm thinking: start a thread which opens the connection, and manages the protocol parsing etc... and message back to the "controller" thread with results/state changes. that way the UI is never stuck waiting for network results. the question is really how should i message between that network thread and any consumers/producers of network packets?

method calls with nslocks around them?
the event system?
notifications?

any advice would be appreciated.


  • Follow-Ups:
    • Re: networking advice.
      • From: Peter Sichel <email@hidden>
  • Prev by Date: Re: CORBA with Mac OS X
  • Next by Date: creating icons
  • Previous by thread: Re: Varying row heights in NSTableView
  • Next by thread: Re: networking advice.
  • Index(es):
    • Date
    • Thread