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

Re: networking advice.


  • Subject: Re: networking advice.
  • From: Peter Sichel <email@hidden>
  • Date: Mon, 22 Oct 2001 08:56:48 -0400

I've been doing similar work using Distributed Objects (DO) per
the Cocoa SimpleThreads example.

I do as much networking as possible in the server threads themselves
and mostly send back user interface updates.

- Peter

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.

--


References: 
 >networking advice. (From: Tom Waters <email@hidden>)

  • Prev by Date: Re: Slight problem with updates in NSTableView
  • Next by Date: Platform Object Model [was: Re: CORBA with Mac OS X]
  • Previous by thread: networking advice.
  • Next by thread: creating icons
  • Index(es):
    • Date
    • Thread