On Jul 30, 2009, at 3:17 PM, Christiaan Hofman wrote:

>
> On Jul 30, 2009, at 2:55 PM, Sven-S. Porst wrote:
>
>>> Yes, one to advertise bonjour and one for the actual connection to a
>>> individual clients.
>>
>>
>> I'm not sure I understand this: Typically an application just
>> advertises a single service, no matter how many ports it needs to  
>> open.
>>
>>              Sven
>
> I'm not sure myself. What do you use to see these services? And do  
> you see it when you turn of sharing?
>
> Christiaan
>

I think I see it better now. I think the _nssocketport._tcp you see is  
the NSSocketPort registered by the NSSocketPortNameService by the line  
you mentioned (NSSocketPortNameService underneath also advertises  
using bonjour). The _bdsk,_tcp is the NSNetService created on line 286  
in -newNetServiceWithSharingName:. The first one is the named socket  
port that's used for clients to connect back to (using DO through  
NSConnection), and is created in a background thread. The second one  
advertises the service and the sharing name, and is searched for by  
NSNetseviceBrowser.

Perhaps it would be possible to use a single service with a single  
port (in the background thread), but I'm not sure if that works with  
DO (I've certainly never seen sample code for that). I know too little  
about ports to know for sure if the port used by the netservice can be  
used for DO. The only thing I know for communicating over this port is  
directly passing data over the input/output streams, but that's too  
low-level.

Christiaan


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to