mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
KcpClient/Server: change callbacks to protected so inheriting classes can use them too
This commit is contained in:
parent
660b57ecb7
commit
dd50a43b9b
@ -35,10 +35,10 @@ public class KcpClient
|
||||
// events are readonly, set in constructor.
|
||||
// this ensures they are always initialized when used.
|
||||
// fixes https://github.com/MirrorNetworking/Mirror/issues/3337 and more
|
||||
readonly Action OnConnected;
|
||||
readonly Action<ArraySegment<byte>, KcpChannel> OnData;
|
||||
readonly Action OnDisconnected;
|
||||
readonly Action<ErrorCode, string> OnError;
|
||||
protected readonly Action OnConnected;
|
||||
protected readonly Action<ArraySegment<byte>, KcpChannel> OnData;
|
||||
protected readonly Action OnDisconnected;
|
||||
protected readonly Action<ErrorCode, string> OnError;
|
||||
|
||||
// state
|
||||
public bool connected;
|
||||
|
@ -18,10 +18,10 @@ public class KcpServer
|
||||
// events are readonly, set in constructor.
|
||||
// this ensures they are always initialized when used.
|
||||
// fixes https://github.com/MirrorNetworking/Mirror/issues/3337 and more
|
||||
readonly Action<int> OnConnected;
|
||||
readonly Action<int, ArraySegment<byte>, KcpChannel> OnData;
|
||||
readonly Action<int> OnDisconnected;
|
||||
readonly Action<int, ErrorCode, string> OnError;
|
||||
protected readonly Action<int> OnConnected;
|
||||
protected readonly Action<int, ArraySegment<byte>, KcpChannel> OnData;
|
||||
protected readonly Action<int> OnDisconnected;
|
||||
protected readonly Action<int, ErrorCode, string> OnError;
|
||||
|
||||
// configuration
|
||||
readonly KcpConfig config;
|
||||
|
Loading…
Reference in New Issue
Block a user