[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Monthly Archives]
[List Home]
Re: [Virtools] Implementation of a Client/Server building block
- Subject: Re: [Virtools] Implementation of a Client/Server building block
- From: rob_p@igss.net
- Date: Sat, 27 Jan 2001 10:54:52 -0500
My best suggestion would be to look at one of the existing managers (I'm
assuming
you have the SDK of course <g>.
One example is the FloorManager.
(sdk\samples\source_behaviors\collision\managers).
The important methods in FloorManager.h are:
virtual CKERROR PreClearAll();
virtual CKERROR OnCKInit();
virtual CKERROR OnCKPlay();
virtual CKERROR PostLoad();
virtual CKDWORD GetValidFunctionsMask()
return CKMANAGER_FUNC_PreClearAll|
CKMANAGER_FUNC_PostLoad|
CKMANAGER_FUNC_OnCKInit|
CKMANAGER_FUNC_OnCKPlay;
}
These are more or less common to most managers. The GetValidFunctionsMask()
enumerate which of these methods,
this manager will be implementing. It's pretty straight forward. The
OnCKPlay() method will be called when the user
presses play for instance. Note there are other "callbacks" as well.
You can use the manager to keep and dispatch messages the the thread is
receiving. So for instance, let's say you create you're
thread in the manager, you can have a building block which queries the
manager if there is a message available and get's it
if there is.
You can get access to the Manager through this function (the manager class I
created was called NET_Manager) in your
building block for instance:
NET_Manager *netMan = (NET_Manager
*)behcontext.Context->GetManagerByGuid(NET_MANAGER_GUID);
netMan->isMessageAvailable();
Remember that a manager is a "global" sort of entity, so the building blocks
have no direct
access to it/them:
Hope this is a little helpful,
Rob
--
Rob Pringle
IGSS
rob_p@igss.net
robert.pringle@sympatico.ca
----- Original Message -----
From: "Robert Praxmarer" <cubic@fl.aec.at>
To: "Rob Pringle" <robert.pringle@sympatico.ca>
Cc: <virtools-user-group@lists.theswapmeet.com>
Sent: Monday, February 26, 2001 6:10 AM
Subject: AW: [Virtools] Implementation of a Client/Server building block
> Hi,
> could anyone tell me where to get a documentation about programming a
> manager and how to use a manager with nemo ???
> Would be very grateful, because I'm currentlcy working on a art project
for
> an international group.
> Documents, Links, Programming Templates are greatly appreciated.
>
> Best regards cubic.
>
> -----Ursprüngliche Nachricht-----
> Von: owner-virtools-user-group@lists.theswapmeet.com
> [mailto:owner-virtools-user-group@lists.theswapmeet.com]Im Auftrag von
> Rob Pringle
> Gesendet: Freitag, 23. Februar 2001 07:03
> An: Robert Praxmarer
> Cc: virtools-user-group@lists.theswapmeet.com
> Betreff: Re: [Virtools] Implementation of a Client/Server building block
>
>
> What you're proposing certainly can be done. I've implemented something
> tihis
> already (client/server threadbased UDP/TCP building blocks) and it works
> beautifully.
> Nemo has no problems with it as long as you implement it correctly. I
broke
> down the
> communication pipeline into a small series of blocks to get the necessary
> control that you
> need for games but it all depends on your needs.
>
> Good luck,
> Rob
>
> Robert Praxmarer wrote:
>
> > Hi,
> > We want to implement a building block for bidirectional TCP/IP
> > communication.
> > Therefor we need a building block which serves as a server and client.
> > My question is regarding the server. The server has to run as a thread,
> and
> > I want to know if there could occure problems with Nemo.
> > Maybe someone had to deal with the same subject and has already done
such
> a
> > communication block, which is able to send and receive TCP/IP data.
> >
> > Best regards,
> > cubic
> >
> > Virtual Reality Integrator
> > @ Ars Electronica Futurlab
> > Linz Austria
> >
> > ...............................................................
> > Distributed via the virtools-user-group list:
> http://www.theswapmeet.com/numl.html
> > To reply to the list instead of its author, use "Reply to All"
> > To unsubscribe: send "unsubscribe virtools-user-group" to
> Majordomo@lists.theswapmeet.com
> > To subscribe: send "subscribe virtools-user-group" to
> Majordomo@lists.theswapmeet.com
> > To post a message: send it to virtools-user-group@lists.theswapmeet.com
> > ...............................................................
>
> ...............................................................
> Distributed via the virtools-user-group list:
> http://www.theswapmeet.com/numl.html
> To reply to the list instead of its author, use "Reply to All"
> To unsubscribe: send "unsubscribe virtools-user-group" to
> Majordomo@lists.theswapmeet.com
> To subscribe: send "subscribe virtools-user-group" to
> Majordomo@lists.theswapmeet.com
> To post a message: send it to virtools-user-group@lists.theswapmeet.com
> ...............................................................
>
> ...............................................................
> Distributed via the virtools-user-group list:
http://www.theswapmeet.com/numl.html
> To reply to the list instead of its author, use "Reply to All"
> To unsubscribe: send "unsubscribe virtools-user-group" to
Majordomo@lists.theswapmeet.com
> To subscribe: send "subscribe virtools-user-group" to
Majordomo@lists.theswapmeet.com
> To post a message: send it to virtools-user-group@lists.theswapmeet.com
> ...............................................................
>
...............................................................
Distributed via the virtools-user-group list: http://www.theswapmeet.com/numl.html
To reply to the list instead of its author, use "Reply to All"
To unsubscribe: send "unsubscribe virtools-user-group" to Majordomo@lists.theswapmeet.com
To subscribe: send "subscribe virtools-user-group" to Majordomo@lists.theswapmeet.com
To post a message: send it to virtools-user-group@lists.theswapmeet.com
...............................................................
References: