summaryrefslogtreecommitdiff
path: root/Runtime/Network/NetworkStubs.h
blob: 1cca813c51e826011b84be0695e6ccebfeb40fb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef UNITY_NETWORK_STUBS_H_
#define UNITY_NETWORK_STUBS_H_

#if !ENABLE_NETWORK
typedef int RPCParameters;

struct SystemAddress
{
	const char *ToString(bool writePort=true) const { return "dummy-system-address"; }
	void SetBinaryAddress(const char *str) {}

	unsigned int binaryAddress;
	unsigned short port;
};

//typedef int NetworkPlayer;
typedef int AssetToPrefab;
typedef int NatPunchthrough;

typedef unsigned int RakNetTime;
typedef long long RakNetTimeNS;

class RakPeerInterface;
//class NetworkMessageInfo;

//typedef int PlayerTable;
//typedef int HostData;

/*class Ping
{
	int m_Time;
	bool m_IsDone;
	std::string m_IP;
//	Mutex m_Mutex;
	
	public:
	int GetTime() { return m_Time; }
	void SetTime(int value) { m_Time = value; }
	int GetIsDone() { return m_IsDone; }
	void SetIsDone(bool value) { m_IsDone=value; }
	std::string GetIP() { return m_IP; }
	void SetIP(std::string value) { m_IP = value; }
};*/

class BitstreamPacker
{
public:
	template<class A>
	void Serialize( A const& a ) {}

	template<class A, class B>
	void Serialize( A const& a, B const& b ) {}

	bool IsReading() const { return false; }
	bool IsWriting() const { return false; }
};

namespace RakNet {

class BitStream;

}

typedef int PacketPriority;
/*{
	SYSTEM_PRIORITY,   /// \internal Used by RakNet to send above-high priority messages.
	HIGH_PRIORITY,   /// High priority messages are send before medium priority messages.
	MEDIUM_PRIORITY,   /// Medium priority messages are send before low priority messages.
	LOW_PRIORITY,   /// Low priority messages are only sent when no other messages are waiting.
	NUMBER_OF_PRIORITIES
};*/


#endif


#endif // UNITY_NETWORK_STUBS_H_