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

Clarification: DO and client identification?


  • Subject: Clarification: DO and client identification?
  • From: Ondra Cada <email@hidden>
  • Date: Sat, 16 Feb 2002 11:33:34 +0100

Hello,

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 ;)

@protocol ServerProtocol // the messages which server provides to clients
-(oneway void)someServerMethodWithObject:(byref id)clientObject;
-(oneway void)anotherOneWithoutAnArgument;
@end
// server implementation:
@interface Server:NSObject<ServerProtocol> @end
@implementation Server
-(oneway void)someServerMethodWithObject:(byref id)clientObject {
// here it's easy to get the client identification by way of "its" connection:
NSConnection *clientConn=[clientObject connectionForProxy];
}
-(oneway void)anotherOneWithoutAnArgument {
NSConnection *clientConn=????; // but what to do now (or if the arg is a bycopy)?
}
@end
....
// this way the server offers its services:
[conn=[NSConnection defaultConnection] setRootObject:[Server new]];
[conn registerName:SOMENAME];
[conn runInNewThread];
....

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

Or would it be perhaps possible to hack in NSConnection somehow, to change
signature of each method, so that eg. whenever client sends [server foo] or
[server bar:1] to its remote proxy 'server', the actual server object on the
server side would actually get
fooThroughConnection:(NSConnection*)connectionWhichServedItLocally or bar:1
throughConnection:(NSConnection*)connectionWhichServedItLocally message? That
would be also a quite nice solution for me...

TIA,
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.

  • Follow-Ups:
    • Re: Clarification: DO and client identification?
      • From: Chris Kane <email@hidden>
References: 
 >DO and client identification? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: what's an NSZone?
  • Next by Date: Re: what's an NSZone?
  • Previous by thread: DO and client identification?
  • Next by thread: Re: Clarification: DO and client identification?
  • Index(es):
    • Date
    • Thread