Show
Ignore:
Timestamp:
02/01/10 15:42:38 (6 months ago)
Author:
trichards
Message:

Implemented getMessageId and getRequestMessageId methods to ZBoostNetworking protocol classes.
I still think getMessageId is wrong, but I'll fix that later. I think I need to add a global unique messageId generator in ApplicationServer? instead of having one per Message implementation.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBoostNetworking/src/HTTP/Message.cpp

    r1086 r3350  
    8282 
    8383//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
     84unsigned int  
     85Message::getMessageId() const 
     86{ 
     87    static Zen::Threading::SpinLock sm_spinLock; 
     88    static unsigned int sm_lastId = 0; 
     89 
     90    Zen::Threading::xCriticalSection lock(sm_spinLock); 
     91    return ++sm_lastId; 
     92} 
     93 
     94//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
    8495}   // namespace HTTP 
    8596}   // namespace AppServer