gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Code for fast connecting to remote objects (like gpbs)


From: Stefan Urbanek
Subject: Code for fast connecting to remote objects (like gpbs)
Date: Fri, 08 Aug 2003 23:22:56 +0200

Hi,

While speaking about gpbs crashing and long delay when restarting, i am sending a 
piece of code that should improve that. The code does quite fast launch&connect.

Attached are two files: one for server side (afsimulator.m) and the other for 
client side (remote.m). It works like this:
Client launghes server and gives it some unique string as an argument. Client 
registers itself as distributed notification observer for a notification with 
object being that identifier. When server is ready it posts distributed 
notification with that unique identifier, so client knows when the server is 
ready. Client receives notification and can do immediate connect by 
NSConnection.

This is done asynchronously, however, some NSLock lockBeforeDate: mechansim can be 
used if you want to launch&connect and immediately use, as in app using gpbs.

Well, as usual, i have no time to play with it, so i am sending unmodified 
parts from one of my projects where i am using such code. I think it is not 
difficult to understand the code and modify it to suit particular needs 
(gpbs?). If someone finds this code useful, feel free to reuse it. Or just let 
me know what do you think of it (if it is ok, or not).

Best regards,

Stefan Urbanek
--
http://urbanek.host.sk

First they ignore you, then they laugh at you, then they fight you, then you 
win.
- Mahatma Gandhi

<afsimulator.m><remote.m>

Attachment: afsimulator.m
Description: Text document

Attachment: remote.m
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]