• 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: Clarification: DO and client identification?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clarification: DO and client identification?


  • Subject: Re: Clarification: DO and client identification?
  • From: Chris Kane <email@hidden>
  • Date: Sun, 24 Feb 2002 13:00:03 -0800

On Saturday, February 16, 2002, at 02:33 AM, Ondra Cada wrote:
I'll try to re-phrase my question, so that it is unambiguous (or so I hope ;)

is there any way to identify which client sent a DO message which is just
being served? I would be grateful even for a negative answer from someone who
knows DO well (so that I know I should not vaste time in searching for a
non-existing solution ;)

[...]
Although I would prefer identification of the client by way of "its"
connection, any other way (like, port or so) would do.

Well, the connection delegate can implement the -connection:handleRequest: method.

I'm not sure I've ever seen or heard of anyone actually implementing this method for any purpose (great sell job, eh?), but it's not too hard. The invocation for you to invoke is given to you, and you finish up by calling -replyWithException: (which is a little misleading, it doesn't mean "use this exception as the reply" but rather "reply, with the invocation's return value, or this optional exception". And return YES, you handled it. Presumably in your case you can use the connection parameter right then for whatever you're doing, or you could squirrel it away somewhere for later use. You should handle any exceptions the -invoke might hurl.

Or, you can return NO, and DO will continue on and handle the method itself as normal, but you've gotten a callback telling you what the connection and invocation is about to be, which can be squirreled away for use. You don't get to "surround" the beginning and ending of the invocation of the remote request into your server this way though, which could be required in some situations.


Chris Kane
Cocoa Framework, Apple
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Clarification: DO and client identification? (From: Ondra Cada <email@hidden>)

  • Prev by Date: PB and MySQL
  • Next by Date: Re: PB and MySQL
  • Previous by thread: Clarification: DO and client identification?
  • Next by thread: Java NSOutlineView
  • Index(es):
    • Date
    • Thread