mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
move creation inside class so can be controlled by same rwlock
This commit is contained in:
parent
423ff190ea
commit
7a15f44c12
1 changed files with 4 additions and 2 deletions
|
@ -19,7 +19,6 @@ class CookieRef {
|
|||
|
||||
public:
|
||||
|
||||
CookieRef( string s );
|
||||
~CookieRef();
|
||||
|
||||
/* Within this cookie, remember that this hostID and socket go together.
|
||||
|
@ -33,8 +32,11 @@ class CookieRef {
|
|||
string Name() { return m_name; }
|
||||
|
||||
static CookieMapIterator GetCookieNameIterator();
|
||||
static CookieRef* AddNew( string s );
|
||||
|
||||
private:
|
||||
CookieRef( string s );
|
||||
|
||||
map<HostID,int> m_hostSockets;
|
||||
pthread_mutex_t m_mutex;
|
||||
CookieID m_connectionID;
|
||||
|
@ -54,7 +56,7 @@ class CookieMapIterator {
|
|||
CookieMap::const_iterator _iter;
|
||||
};
|
||||
|
||||
CookieRef* get_make_cookieRef( char* cookie );
|
||||
CookieRef* get_make_cookieRef( char* cookie, CookieID connID );
|
||||
CookieRef* get_cookieRef( unsigned short cookieID );
|
||||
void Associate( int socket, CookieRef* cref );
|
||||
void RemoveSocketRefs( int socket );
|
||||
|
|
Loading…
Reference in a new issue