Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
acctserver.h
Go to the documentation of this file.
1
#ifndef __ACCTSERVER_H
2
#define __ACCTSERVER_H
3
4
#define NO_UNIT_STUFF
5
#include <vector>
6
7
#include "
configxml.h
"
8
#include "
networking/accountsxml.h
"
9
#include "
networking/lowlevel/packet.h
"
10
#include "
networking/lowlevel/netui.h
"
11
#include "
networking/lowlevel/vsnet_socketset.h
"
12
13
typedef
vector< Account* >::iterator
VI
;
14
26
class
AccountServer
27
{
28
SocketSet
_sock_set;
29
30
NetUITCP
NetworkToClient;
31
ServerSocket
*Network;
32
//TCPNetUI * Network; // Network Interface
33
list< SOCKETALT >Socks;
//List of active sockets on which we can receive requests
34
list< SOCKETALT >DeadSocks;
//List of sockets to close
35
36
int
newaccounts;
37
int
keeprun;
38
//SOCKETALT conn_sock;
39
Packet
packet;
40
41
double
savetime;
42
double
curtime;
43
44
public
:
AccountServer
();
45
~AccountServer
();
46
47
void
startMsg
();
48
void
start
();
//Starts the server
49
void
save
();
//Saves new accounts if there are
50
void
recvMsg
(
SOCKETALT
sock );
//Receive message
51
void
sendAuthorized
(
SOCKETALT
sock,
Account
*acct );
//Send authorization and related data
52
void
sendUnauthorized
(
SOCKETALT
sock,
Account
*acct );
//Send unauthorizated connection
53
void
sendAlreadyConnected
(
SOCKETALT
sock,
Account
*acct );
54
void
sendServerData
(
SOCKETALT
sock,
Account
*acct );
55
56
void
writeSave
(
const
char
*
buffer
,
unsigned
int
bufferlen );
57
void
removeDeadSockets
();
58
};
59
60
#endif
61
src
networking
acctserver.h
Generated on Fri May 29 2015 23:07:34 for Vegastrike 0.5.1 rc1 by
1.8.4