-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetPeer.Internal.cs
More file actions
109 lines (86 loc) · 2.98 KB
/
Copy pathNetPeer.Internal.cs
File metadata and controls
109 lines (86 loc) · 2.98 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#if !__ANDROID__ && !IOS && !UNITY_WEBPLAYER && !UNITY_ANDROID && !UNITY_IPHONE
#define IS_MAC_AVAILABLE
#endif
using System;
using System.Net;
using System.Threading;
using System.Diagnostics;
using System.Security.Cryptography;
using System.Net.Sockets;
using System.Collections.Generic;
namespace Lidgren.Network
{
public partial class NetPeer
{
private NetPeerStatus m_status;
private object m_initializeLock = new object();
internal readonly NetPeerConfiguration m_configuration;
private readonly NetQueue<NetIncomingMessage> m_releasedIncomingMessages;
internal readonly NetQueue<NetTuple<IPEndPoint, NetOutgoingMessage>> m_unsentUnconnectedMessages;
internal Dictionary<IPEndPoint, NetConnection> m_handshakes;
internal readonly NetPeerStatistics m_statistics;
internal bool m_executeFlushSendQueue;
private AutoResetEvent m_messageReceivedEvent;
/// <summary>
/// Gets the socket, if Start() has been called
/// </summary>
public Socket Socket { get { return null; } }
/// <summary>
/// Call this to register a callback for when a new message arrives
/// </summary>
public void RegisterReceivedCallback(SendOrPostCallback callback, SynchronizationContext syncContext = null)
{
}
/// <summary>
/// Call this to unregister a callback, but remember to do it in the same synchronization context!
/// </summary>
public void UnregisterReceivedCallback(SendOrPostCallback callback)
{
}
internal void ReleaseMessage(NetIncomingMessage msg)
{
}
private void BindSocket(bool reBind)
{
}
private void InitializeNetwork()
{
}
private void NetworkLoop()
{
}
private void ExecutePeerShutdown()
{
}
private void Heartbeat()
{
}
/// <summary>
/// If NetPeerConfiguration.AutoFlushSendQueue() is false; you need to call this to send all messages queued using SendMessage()
/// </summary>
public void FlushSendQueue()
{
m_executeFlushSendQueue = true;
}
internal void HandleIncomingDiscoveryRequest(double now, IPEndPoint senderEndPoint, int ptr, int payloadByteLength)
{
}
internal void HandleIncomingDiscoveryResponse(double now, IPEndPoint senderEndPoint, int ptr, int payloadByteLength)
{
}
private void ReceivedUnconnectedLibraryMessage(double now, IPEndPoint senderEndPoint, NetMessageType tp, int ptr, int payloadByteLength)
{
}
internal void AcceptConnection(NetConnection conn)
{
}
[Conditional("DEBUG")]
internal void VerifyNetworkThread()
{
}
internal NetIncomingMessage SetupReadHelperMessage(int ptr, int payloadLength)
{
return null;
}
}
}