Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/network/message_manager.cc @ 7631

Last change on this file since 7631 was 7631, checked in by rennerc, 18 years ago

synchronisation should work now

File size: 2.1 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Christoph Renner
13   co-programmer: ...
14*/
15
16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
17
18#include "message_manager.h"
19
20using namespace std;
21
22
23/**
24 * standard constructor
25*/
26MessageManager::MessageManager ()
27{
28  this->setClassID( CL_MESSAGE_MANAGER, "MessageManager" );
29}
30
31
32/**
33 * standard deconstructor
34*/
35MessageManager::~MessageManager ()
36{
37}
38
39/**
40 * get the diff to last acked state of userId
41 *
42 * each synchrinizeable defines its own stack of states received and sent over the network. The stack contains
43 * a per user entry for the last sent/received state This function returns a delta compressed state of the
44 * synchronizeable. This state will be transmitted over the network to the other participants
45 *
46 * @param userId user to create diff for
47 * @param data buffer to copy diff in
48 * @param maxLength max bytes to copy into data
49 * @param stateId id of current state
50 * @param fromStateId the reference state for the delta state
51 * @param priorityTH tells getStateDiff to not send element with priority \< priorityTH
52 * @return n bytes copied into data
53 */
54int MessageManager::getStateDiff( int userId, byte * data, int maxLength, int stateId, int fromStateId, int priorityTH )
55{
56}
57
58/**
59 * sets a new state out of a diff created on another host
60 * @param userId hostId of user who send me that diff
61 * @param data pointer to diff
62 * @param length length of diff
63 * @param stateId id of current state
64 * @param fromStateId id of the base state id
65 * @return number bytes read
66 * @todo check for permissions
67 */
68int MessageManager::setStateDiff( int userId, byte * data, int length, int stateId, int fromStateId )
69{
70}
71
72/**
73 * clean up memory reserved for user
74 * @param userId userid
75 */
76void MessageManager::cleanUpUser( int userId )
77{
78}
Note: See TracBrowser for help on using the repository browser.