Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 21, 2009, 12:27:19 AM (15 years ago)
Author:
scheusso
Message:

rest of the cleanup ( mostly client connection handling)
network is now single-threaded ( only in order to become multithreaded again, but thats another story ;) )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp5/src/network/packet/Packet.cc

    r3097 r3202  
    3232#include <cassert>
    3333#include <enet/enet.h>
    34 #include <boost/bind.hpp>
    35 #include <boost/thread/recursive_mutex.hpp>
    36 
    37 #include "network/ConnectionManager.h"
     34
    3835#include "network/ClientInformation.h"
    3936
     
    5855std::map<size_t, Packet *> Packet::packetMap_;
    5956//! Static mutex for any packetMap_ access
    60 static boost::recursive_mutex packetMap_mutex_g;
    6157
    6258Packet::Packet(){
     
    142138      // Assures we don't create a packet and destroy it right after in another thread
    143139      // without having a reference in the packetMap_
    144       boost::recursive_mutex::scoped_lock lock(packetMap_mutex_g);
    145140      packetMap_[(size_t)(void*)enetPacket_] = this;
    146141    }
     
    228223*/
    229224void Packet::deletePacket(ENetPacket *enetPacket){
    230   boost::recursive_mutex::scoped_lock lock(packetMap_mutex_g);
    231225  // Get our Packet from a gloabal map with all Packets created in the send() method of Packet.
    232226  std::map<size_t, Packet*>::iterator it = packetMap_.find((size_t)enetPacket);
Note: See TracChangeset for help on using the changeset viewer.