Develop and Download Open Source Software

Browse CVS Repository

Contents of /xoonips/AL/session.cc

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


Revision 1.4 - (show 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 /*
2 *
3 * ?祉???激?с?括??????????鴻???臂?/span>
4 *
5 * $Revision: 1.3 $
6 * $Log: session.cc,v $
7 * Revision 1.3 2004/11/26 06:24:53 aga
8 * ??ession???<?潟????serid_t??菴遵??.
9 *
10 * Revision 1.2 2004/11/25 09:00:24 youi
11 * get膤脂?∽?違??onst篆??.
12 *
13 * Revision 1.1 2004/11/24 06:54:04 youi
14 * initial version
15 *
16 *
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 userID = 0;
29 }
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 unsigned long session::getSessionID() const { return sessionID; }
42 unsigned long session::getRemoteHost() const { return remoteHost; }
43 time_t session::getDate() const { return date; }
44 userid_t session::getUserID() const { return userID; }
45
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
61 void session::setSessionID( sessionid_t id )
62 {
63 this -> sessionID = id;
64 }
65
66 void session::setUserID( userid_t uid )
67 {
68 this -> userID = uid;
69 }
70

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