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.2 - (hide annotations) (download) (as text)
Thu Nov 25 09:00:24 2004 UTC (19 years, 4 months ago) by youi
Branch: MAIN
Changes since 1.1: +14 -5 lines
File MIME type: text/x-c++src
get系関数にconst修飾.

1 youi 1.1 /*
2     *
3     * ?祉???激?с?括??????????鴻???臂?/span>
4     *
5 youi 1.2 * $Revision: 1.1 $
6     * $Log: session.cc,v $
7     * Revision 1.1 2004/11/24 06:54:04 youi
8     * initial version
9     *
10 youi 1.1 *
11     */
12    
13     #include <stdlib.h>
14    
15     #include "session.h"
16    
17     session::session()
18     {
19     sessionID = 0;
20     remoteHost = 0;
21     date = 0;
22     }
23    
24     session::session( unsigned long remoteHost, time_t date )
25     {
26     this -> remoteHost = remoteHost;
27     this -> date = date;
28    
29     sessionid( remoteHost, date );
30     }
31    
32     session::~session(){}
33    
34 youi 1.2 unsigned long session::getSessionID() const { return sessionID; }
35     unsigned long session::getRemoteHost() const { return remoteHost; }
36     time_t session::getDate() const { return date; }
37 youi 1.1
38     void session::setRemoteHost( unsigned long remoteHost )
39     {
40     this -> remoteHost = remoteHost;
41     sessionid( remoteHost, date );
42     }
43     void session::setDate( time_t date )
44     {
45     this -> date = date;
46     sessionid( remoteHost, date );
47     }
48    
49     void session::sessionid( unsigned long remoteHost, time_t date )
50     {
51     srand( time( NULL ) );
52     sessionID = remoteHost ^ date ^ rand( );
53     }
54 youi 1.2
55     void session::setSessionID( sessionid_t id )
56     {
57     this -> sessionID = id;
58     }
59    

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