Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2009, 4:19:43 PM (15 years ago)
Author:
scheusso
Message:

Network Function calls possible now (already used in Pawn::fire/doFire)

include "network/NetworkFunction.h"
register network functions like this:

registerStaticNetworkFunction( functionPointer ); this is for static (member) functions
registerMemberNetworkFunction( class, function );
this is for non-static member functions

call network functions like this:

callStaticNetworkFunction( functionPointer, clientID, arg1, … ); clientID is 0 for server
callMemberNetworkFunction( class, function, objectID, clientID, arg1, … );
objectID can be obtained by this→getObjectID() for synchronisables

arguments must be supported by MultiType !!
object must inherit from Synchronisable !!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp2/src/orxonox/objects/Test.h

    r2948 r2949  
    5252     
    5353      static void call(unsigned int clientID);
     54      void call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4);
    5455      virtual void tick(float dt);
    5556
     
    7980      static void printV3(){ instance_->checkU3(); }
    8081      static void printV4(){ instance_->checkU4(); }
     82     
     83      void printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5);
    8184
    8285    private:
Note: See TracChangeset for help on using the changeset viewer.