Re: Peer to Peer NSConnection
Re: Peer to Peer NSConnection
- Subject: Re: Peer to Peer NSConnection
- From: Ondra Cada <email@hidden>
- Date: Thu, 18 Oct 2001 12:39:00 +0100
Sam,
>
>>>>> Sam Goldman (SG) wrote at Wed, 17 Oct 2001 19:56:33 -0700:
SG> OK, I understand how to set up a server/client application, but for
SG> chatting I think it makes more sense to open a peer to peer connection.
SG> To set this up, would I just create a server on both computers and have
SG> each app have clients that communicate with the other's server? Is there
SG> a different setup I would use for P to P?
Nope. There is actually no s/c paradigm inside DO but the fact that one task
publishes the interface (in this sense it's a server), and another connects
to it (in this sense it's a client). Otherwise, DO are p2p.
As soon as the connection is established, you can use unlimited two-way
communication: for example, the "client's" first message to the "server's"
root proxy can be something like
-(void)serverObjectIs:(id)theServer;
and the "server" can immediately start behaving as a client, which requests
services from theServer; those services will be served by the object in the
"client".
---
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