home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6167 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  1.8 KB

  1. Path: sparky!uunet!rosie!NeXT.com
  2. From: sam_s@NeXT.com (Sam Streeper)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: DIstributed Objects Problem (HELP!)
  5. Message-ID: <4987@rosie.NeXT.COM>
  6. Date: 15 Sep 92 18:17:58 GMT
  7. References: <1992Sep15.000616.1105@cs.mcgill.ca>
  8. Sender: news@NeXT.COM
  9. Reply-To: sam_s@NeXT.com
  10. Lines: 32
  11.  
  12. samurai@cs.mcgill.ca (Darcy BROCKBANK) writes:
  13.  
  14. > (... A bunch of stuff about distributed applications)
  15.  
  16. You mentioned that you ran the server's connection, but you didn't mention
  17. running the clients connection.  Let's see if I can make this clear.
  18.  
  19. When you asked for the registered server object, you actually got a proxy
  20. to that object.  In order to make that happen, a connection was created for
  21. you automatically on the client side.  You can get this connection like this:
  22.  
  23.     magicConnection = [myServerProxy connectionForProxy];
  24.  
  25. This connection will receive messages at its inPort, but how will it
  26. send those messages to you?  It must have some "thread" of execution to
  27. dispatch those messages to you.  You probably want to run that connection from
  28. DPSclient ("runFromAppKit") so that the Objective-C messages are dispatched
  29. from the main thread.  You could run the connection in a new thread, but then
  30. when unsolicited messages came in (like those your server sends) you would
  31. handle those messages in the client's connection's thread, and you don't
  32. want multiple threads running in a NeXTstep app unless you really know
  33. what you're doing.
  34.  
  35. In other words, since you don't run the client connection, messages
  36. arrive there but you never give control to the connection code to
  37. do anything with those messages, so they just sit there at the port.
  38.  
  39. -sam
  40.  
  41. --
  42. Opinions expressed herein are not those of my employer.  They're not even
  43. mine.  They're probably wrong besides.  How did they get in here, anyway?
  44.