Develop and Download Open Source Software

Browse CVS Repository

Annotation of /xoonips/AL/session.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download) (as text)
Sat Nov 27 02:24:45 2004 UTC (19 years, 4 months ago) by aga
Branch: MAIN
Changes since 1.3: +4 -3 lines
File MIME type: text/x-c++src
・sessionidを自動生成しないよう修正.

1 youi 1.1 /*
2     *
3     * ?祉???激?с?括??????????鴻???臂?/span>
4     *
5 aga 1.4 * $Revision: 1.3 $
6 youi 1.2 * $Log: session.cc,v $
7 aga 1.4 * Revision 1.3 2004/11/26 06:24:53 aga
8     * ??ession???<?潟????serid_t??菴遵??.
9     *
10 aga 1.3 * Revision 1.2 2004/11/25 09:00:24 youi
11     * get膤脂?∽?違??onst篆??.
12     *
13 youi 1.2 * Revision 1.1 2004/11/24 06:54:04 youi
14     * initial version
15     *
16 youi 1.1 *
17     */
18    
19     #include <stdlib.h>
20    
21     #include "session.h"
22    
23     session::session()
24     {
25     sessionID = 0;
26     remoteHost = 0;
27     date = 0;
28 aga 1.3 userID = 0;
29 youi 1.1 }
30    
31     session::session( unsigned long remoteHost, time_t date )
32     {
33     this -> remoteHost = remoteHost;
34     this -> date = date;
35    
36     sessionid( remoteHost, date );
37     }
38    
39     session::~session(){}
40    
41 youi 1.2 unsigned long session::getSessionID() const { return sessionID; }
42     unsigned long session::getRemoteHost() const { return remoteHost; }
43     time_t session::getDate() const { return date; }
44 aga 1.3 userid_t session::getUserID() const { return userID; }
45 youi 1.1
46     void session::setRemoteHost( unsigned long remoteHost )
47     {
48     this -> remoteHost = remoteHost;
49     }
50     void session::setDate( time_t date )
51     {
52     this -> date = date;
53     }
54    
55     void session::sessionid( unsigned long remoteHost, time_t date )
56     {
57     srand( time( NULL ) );
58     sessionID = remoteHost ^ date ^ rand( );
59     }
60 youi 1.2
61     void session::setSessionID( sessionid_t id )
62     {
63     this -> sessionID = id;
64 aga 1.3 }
65    
66     void session::setUserID( userid_t uid )
67     {
68     this -> userID = uid;
69 youi 1.2 }
70    

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26