home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!spool.mu.edu!wupost!micro-heart-of-gold.mit.edu!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!homer.cs.mcgill.ca!samurai
- From: samurai@cs.mcgill.ca (Darcy BROCKBANK)
- Subject: Re: DIstributed Objects Problem (HELP!)
- Message-ID: <1992Sep15.215927.13958@cs.mcgill.ca>
- Sender: news@cs.mcgill.ca (Netnews Administrator)
- Organization: SOCS - Mcgill University, Montreal, Canada
- References: <1992Sep15.000616.1105@cs.mcgill.ca> <4987@rosie.NeXT.COM>
- Date: Tue, 15 Sep 1992 21:59:27 GMT
- Lines: 52
-
- In article <4987@rosie.NeXT.COM> sam_s@NeXT.com writes:
- >samurai@cs.mcgill.ca (Darcy BROCKBANK) writes:
- >
- >> (... A bunch of stuff about distributed applications)
- >
- >You mentioned that you ran the server's connection, but you didn't mention
- >running the clients connection. Let's see if I can make this clear.
- >
- >When you asked for the registered server object, you actually got a proxy
- >to that object. In order to make that happen, a connection was created for
- >you automatically on the client side. You can get this connection like this:
- >
- > magicConnection = [myServerProxy connectionForProxy];
-
-
- [ stuff deleted ]
-
- O Great Sam, Bringer of BackSpace, and Light of the People, you are
- absolutly correct!
-
- I just added:
-
- [[myServerProxy connectionForProxy] runFromAppKit];
-
- And all my problems were solved!
-
- Thanks a million...
-
- - db
-
- >
- >This connection will receive messages at its inPort, but how will it
- >send those messages to you? It must have some "thread" of execution to
- >dispatch those messages to you. You probably want to run that connection from
- >DPSclient ("runFromAppKit") so that the Objective-C messages are dispatched
- >from the main thread. You could run the connection in a new thread, but then
- >when unsolicited messages came in (like those your server sends) you would
- >handle those messages in the client's connection's thread, and you don't
- >want multiple threads running in a NeXTstep app unless you really know
- >what you're doing.
- >
- >In other words, since you don't run the client connection, messages
- >arrive there but you never give control to the connection code to
- >do anything with those messages, so they just sit there at the port.
- >
- >-sam
- >
- >--
- >Opinions expressed herein are not those of my employer. They're not even
- >mine. They're probably wrong besides. How did they get in here, anyway?
-
-
-