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.1 - (show annotations) (download) (as text)
Wed Nov 24 06:54:04 2004 UTC (19 years, 4 months ago) by youi
Branch: MAIN
File MIME type: text/x-c++src
initial version

1 /*
2 *
3 * セッション管理用クラスの定義
4 *
5 * $Revision$
6 * $Log$
7 *
8 */
9
10 #include <stdlib.h>
11
12 #include "session.h"
13
14 session::session()
15 {
16 sessionID = 0;
17 remoteHost = 0;
18 date = 0;
19 }
20
21 session::session( unsigned long remoteHost, time_t date )
22 {
23 this -> remoteHost = remoteHost;
24 this -> date = date;
25
26 sessionid( remoteHost, date );
27 }
28
29 session::~session(){}
30
31 unsigned long session::getSessionID(){ return sessionID; }
32 unsigned long session::getRemoteHost(){ return remoteHost; }
33 time_t session::getDate(){ return date; }
34
35 void session::setRemoteHost( unsigned long remoteHost )
36 {
37 this -> remoteHost = remoteHost;
38 sessionid( remoteHost, date );
39 }
40 void session::setDate( time_t date )
41 {
42 this -> date = date;
43 sessionid( remoteHost, date );
44 }
45
46 void session::sessionid( unsigned long remoteHost, time_t date )
47 {
48 srand( time( NULL ) );
49 sessionID = remoteHost ^ date ^ rand( );
50 }

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