source:
network-game/common/Player.h@
4c202e0
Last change on this file since 4c202e0 was 4c202e0, checked in by , 12 years ago | |
---|---|
|
|
File size: 545 bytes |
Rev | Line | |
---|---|---|
[2488852] | 1 | #ifndef _PLAYER_H |
2 | #define _PLAYER_H | |
3 | ||
[4c202e0] | 4 | #include "Compiler.h" |
5 | ||
6 | #if defined WINDOWS | |
7 | #include <winsock2.h> | |
8 | #include <WS2tcpip.h> | |
9 | #elif defined LINUX | |
10 | #include <netinet/in.h> | |
11 | #endif | |
12 | ||
[2488852] | 13 | #include <string> |
14 | ||
[edfd1d0] | 15 | #include "Common.h" |
16 | ||
[2488852] | 17 | using namespace std; |
18 | ||
[8e540f4] | 19 | class Player { |
[2488852] | 20 | public: |
[59061f6] | 21 | Player(string name, string password); |
22 | Player(string name, sockaddr_in addr); // this will be deleted | |
[8e540f4] | 23 | ~Player(); |
[2488852] | 24 | |
[59061f6] | 25 | void setAddr(sockaddr_in addr); |
[edfd1d0] | 26 | void clearSensitiveInfo(); |
[59061f6] | 27 | |
[8e540f4] | 28 | string name; |
[59061f6] | 29 | string password; |
[8e540f4] | 30 | sockaddr_in addr; |
[edfd1d0] | 31 | PLAYER_POS pos; |
[2488852] | 32 | }; |
33 | ||
34 | #endif |
Note:
See TracBrowser
for help on using the repository browser.