Hi Robert,

On Fri, 2004-01-16 at 21:54, Robert Hinn wrote:
> Hi,
> 
> I've got some other questions:
> 
> - Is there a way to unregister functors from RemoteAspects? I've only 
> seen register* methods, no unregister* methods... I only need a callback 
> once to find a certain named node, and I'd like to unregister the 
> callback afterwards... Right now, I'm just using a flag and immediately 
> return from the function when I no longer need the callback...

There probably isn't right now, as nobody has needed it. You're welcome
to add it and submit a patch, though. ;)

> - While I'm at it: I couldn't find much documentation on the Functor 
> stuff... As far as I understand, they are used for callback purposes, is 
> that right?

Yes. The basic idea of the Functors is to wrap the call of a function or
a method into an object that can be passed around. An additional
complication arises from our own pointer types and using the functors
for traversals, where they can call methods of an object that is passed
as a parameter. So they are pretty powerful, but using them is not as
easy as we would like it to be, thanks to the variety of compilers that
we want to support.

A good start on how to use them is the traverser tutorial and if you
need to find the name for a specific combination of arguments I usually
check testfunctors.cpp in Base/Functors.

> - I'm now able to replicate a scene graph from a server to several 
> clients via the RemoteAspect. As far as I understood it, the Connection 
> class handles this 1-n connection. I extended the StreamSockConnection 
> to allow accepting new connections in a non-blocking way (I just put the 
> accept() calls in another thread that is handled by the Connection). 
> That seems to work fine, too. However, I would like clients to be able 
> to connect and disconnect anytime. I'm not sure wether the Connection 
> class has any way of detecting disconnected channels, so far I haven't 
> succeeded at this (I've implemented a callback for new connections, 
> after the accept() call returns, maybe I can come up with something 
> likewise when detecting a broken connection).

No idea here. Marcus, can you comment on that?

> - Clients might connect to the scene server some time after the scene is 
> initialized (loaded from a file). It seems that they only get the 
> current change list, not the whole scene. That sounds logical because I 
> clear the change list after every sendSync() (otherwise I understand 
> that the changes would be applied another time with the next sync()). 
> However, I'd like a client that connects to the server to get the whole 
> scene in its current state, so that I can use receiveSync() 
> afterwards... I already tried the copyToBin() / copyFromBin() methods in 
> NodePtr on my Connection (with FieldBits::AllFields), but the 
> copyFromBin() call crashes. I've sent the size beforehand (via 
> getBinSize() and connection->putValue()), and this is sent correctly, so 
> I'm positive that the copyFromBin() call causes the segfault. I'm not 
> sure why, since I couldn't find much documentation on that method, too. 
> What's strange is that getBinSize() returns 41, though I've loaded the 
> tie.wrl scene and expected it to be much larger than 41 bytes...? Am I 
> doing something wrong (should the RemoteAspect replicate the full scene 
> for newly connected receivers?) or what would be the preferred way to 
> manually send the whole scene?

I wouldn't mess with the low-level copyFrom/ToBin. We've been talking
about this kind on initialization for a while, but haven't gotten around
to do it. The problem is that you need to transfer the Creation records,
so that the remote host can create all the needed objects. After that
you can just touch the objects that you want to be transfered
(beginEditCP(ptr); endEditCP(ptr);) and all their data will be
transfered. 

> - Does anyone know of a way to search (not browse) the mailing list 
> archives (at sourceforge or geocrawler)? I'm able to browse them, but I 
> haven't found a search option...

I don't know any, but I would really like to know, too. This is the most
annoying part of SourceForge, not having a usable mailing list archive.
I filed a feature request, but it has been drowned in other things. :(

I think I have pretty much all of the mails in personal box, if somebody
has a good tool to generate a searchable index to put on a website I'd
be interested. Maybe we can just put up our own search system on
opensg.org.

Thanks

        Dirk




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to