Ignore:
Timestamp:
Jul 11, 2010, 10:48:39 AM (14 years ago)
Author:
Torben Dannhauer
Message:

ENet debugging/improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/include/cluster/dataIO_clusterENet_implementation.h

    r65 r66  
    44#endif // _MSC_VER > 1000
    55
     6#include <osg/referenced>
    67#include <enet/enet.h>
    78#include <iostream>
     
    910#include <vector>
    1011
     12namespace osgVisual
     13{
    1114
    12 
    13 class ENet_implementation
     15class dataIO_clusterENet_implementation :       public osg::Referenced
    1416{
    1517public:
    16         ENet_implementation();
    17         ~ENet_implementation();
     18        dataIO_clusterENet_implementation();
     19        ~dataIO_clusterENet_implementation();
    1820
    1921        enum role {SERVER, CLIENT};
    2022
    21         bool init( ENet_implementation::role role_, unsigned short port_, int maxClients_=10, int maxChannels_=2, int maxInBandwidth_=0, int maxOutBandwidth_=0 );      // client & server                                                              // Done
     23        bool init( dataIO_clusterENet_implementation::role role_, unsigned short port_, int maxClients_=10, int maxChannels_=2, int maxInBandwidth_=0, int maxOutBandwidth_=0 );        // client & server                                                              // Done
    2224        bool connectTo( const char* remoteAddr_, int connectTimeout_ms_, int clientInfo_=0,  int channelToAlloc_=2 );   // only as client                                                                       // Done
    2325        void sendPacket( ENetPacket* packet_, enet_uint8 channelID_, unsigned int peerID_=0, bool autoFlush_=false );   // by PeerID    // Done
     
    3234protected:
    3335        unsigned short port;
    34         ENet_implementation::role currentRole;
     36        dataIO_clusterENet_implementation::role currentRole;
    3537        static int activeENetInstances;
    3638        bool serverInitialized; // shows if the complete server is initialized. (After init())
     
    4042        ENetEvent event;
    4143};
     44
     45}       // END NAMESPACE
Note: See TracChangeset for help on using the changeset viewer.