Skip to content

Commit 8b4fa05

Browse files
authored
Merge pull request #17 from JohannesDeml/feature/dotnet6
Feature/dotnet6
2 parents 505005a + dc23b3f commit 8b4fa05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1922
-1720
lines changed

Kcp2k/Kcp2k.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFramework>net6.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

Kcp2k/kcp2k/KCP.asmdef

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"name": "kcp",
33
"rootNamespace": "",
4-
"references": [
5-
"GUID:63c380d6dae6946209ed0832388a657c"
6-
],
4+
"references": [],
75
"includePlatforms": [],
86
"excludePlatforms": [],
97
"allowUnsafeCode": true,
File renamed without changes.

Kcp2k/kcp2k/VERSION

Lines changed: 0 additions & 96 deletions
This file was deleted.

Kcp2k/kcp2k/VERSION.txt

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
V1.34 [2023-03-15]
2+
- Send/SendTo/Receive/ReceiveFrom NonBlocking extensions.
3+
to encapsulate WouldBlock allocations, exceptions, etc.
4+
allows for reuse when overwriting KcpServer/Client (i.e. for relays).
5+
6+
V1.33 [2023-03-14]
7+
- perf: KcpServer/Client RawReceive now call socket.Poll to avoid non-blocking
8+
socket's allocating a new SocketException in case they WouldBlock.
9+
fixes https://github.com/MirrorNetworking/Mirror/issues/3413
10+
- perf: KcpServer/Client RawSend now call socket.Poll to avoid non-blocking
11+
socket's allocating a new SocketException in case they WouldBlock.
12+
fixes https://github.com/MirrorNetworking/Mirror/issues/3413
13+
14+
V1.32 [2023-03-12]
15+
- fix: KcpPeer RawInput now doesn't disconnect in case of random internet noise
16+
17+
V1.31 [2023-03-05]
18+
- KcpClient: Tick/Incoming/Outgoing can now be overwritten (virtual)
19+
- breaking: KcpClient now takes KcpConfig in constructor instead of in Connect.
20+
cleaner, and prepares for KcpConfig.MTU setting.
21+
- KcpConfig now includes MTU; KcpPeer now works with KcpConfig's MTU, KcpServer/Client
22+
buffers are now created with config's MTU.
23+
24+
V1.30 [2023-02-20]
25+
- fix: set send/recv buffer sizes directly instead of iterating to find the limit.
26+
fixes: https://github.com/MirrorNetworking/Mirror/issues/3390
27+
- fix: server & client sockets are now always non-blocking to ensure main thread never
28+
blocks on socket.recv/send. Send() now also handles WouldBlock.
29+
- fix: socket.Receive/From directly with non-blocking sockets and handle WouldBlock,
30+
instead of socket.Poll. faster, more obvious, and fixes Poll() looping forever while
31+
socket is in error state. fixes: https://github.com/MirrorNetworking/Mirror/issues/2733
32+
33+
V1.29 [2023-01-28]
34+
- fix: KcpServer.CreateServerSocket now handles NotSupportedException when setting DualMode
35+
https://github.com/MirrorNetworking/Mirror/issues/3358
36+
37+
V1.28 [2023-01-28]
38+
- fix: KcpClient.Connect now resolves hostname before creating peer
39+
https://github.com/MirrorNetworking/Mirror/issues/3361
40+
41+
V1.27 [2023-01-08]
42+
- KcpClient.Connect: invoke own events directly instead of going through peer,
43+
which calls our own events anyway
44+
- fix: KcpPeer/Client/Server callbacks are readonly and assigned in constructor
45+
to ensure they are safe to use at all times.
46+
fixes https://github.com/MirrorNetworking/Mirror/issues/3337
47+
48+
V1.26 [2022-12-22]
49+
- KcpPeer.RawInput: fix compile error in old Unity Mono versions
50+
- fix: KcpServer sets up a new connection's OnError immediately.
51+
fixes KcpPeer throwing NullReferenceException when attempting to call OnError
52+
after authentication errors.
53+
- improved log messages
54+
55+
V1.25 [2022-12-14]
56+
- breaking: removed where-allocation. use IL2CPP on servers instead.
57+
- breaking: KcpConfig to simplify configuration
58+
- high level cleanups
59+
60+
V1.24 [2022-12-14]
61+
- KcpClient: fixed NullReferenceException when connection without a server.
62+
added test coverage to ensure this never happens again.
63+
64+
V1.23 [2022-12-07]
65+
- KcpClient: rawReceiveBuffer exposed
66+
- fix: KcpServer RawSend uses connection.remoteEndPoint instead of the helper
67+
'newClientEP'. fixes clients receiving the wrong messages meant for others.
68+
https://github.com/MirrorNetworking/Mirror/issues/3296
69+
70+
V1.22 [2022-11-30]
71+
- high level refactor, part two.
72+
73+
V1.21 [2022-11-24]
74+
- high level refactor, part one.
75+
- KcpPeer instead of KcpConnection, KcpClientConnection, KcpServerConnection
76+
- RawSend/Receive can now easily be overwritten in KcpClient/Server.
77+
for non-alloc, relays, etc.
78+
79+
V1.20 [2022-11-22]
80+
- perf: KcpClient receive allocation was removed entirely.
81+
reduces Mirror benchmark client sided allocations from 4.9 KB / 1.7 KB (non-alloc) to 0B.
82+
- fix: KcpConnection.Disconnect does not check socket.Connected anymore.
83+
UDP sockets don't have a connection.
84+
fixes Disconnects not being sent to clients in netcore.
85+
- KcpConnection.SendReliable: added OnError instead of logs
86+
87+
V1.19 [2022-05-12]
88+
- feature: OnError ErrorCodes
89+
90+
V1.18 [2022-05-08]
91+
- feature: OnError to allow higher level to show popups etc.
92+
- feature: KcpServer.GetClientAddress is now GetClientEndPoint in order to
93+
expose more details
94+
- ResolveHostname: include exception in log for easier debugging
95+
- fix: KcpClientConnection.RawReceive now logs the SocketException even if
96+
it was expected. makes debugging easier.
97+
- fix: KcpServer.TickIncoming now logs the SocketException even if it was
98+
expected. makes debugging easier.
99+
- fix: KcpClientConnection.RawReceive now calls Disconnect() if the other end
100+
has closed the connection. better than just remaining in a state with unusable
101+
sockets.
102+
103+
V1.17 [2022-01-09]
104+
- perf: server/client MaximizeSendReceiveBuffersToOSLimit option to set send/recv
105+
buffer sizes to OS limit. avoids drops due to small buffers under heavy load.
106+
107+
V1.16 [2022-01-06]
108+
- fix: SendUnreliable respects ArraySegment.Offset
109+
- fix: potential bug with negative length (see PR #2)
110+
- breaking: removed pause handling because it's not necessary for Mirror anymore
111+
112+
V1.15 [2021-12-11]
113+
- feature: feature: MaxRetransmits aka dead_link now configurable
114+
- dead_link disconnect message improved to show exact retransmit count
115+
116+
V1.14 [2021-11-30]
117+
- fix: Send() now throws an exception for messages which require > 255 fragments
118+
- fix: ReliableMaxMessageSize is now limited to messages which require <= 255 fragments
119+
120+
V1.13 [2021-11-28]
121+
- fix: perf: uncork max message size from 144 KB to as much as we want based on
122+
receive window size.
123+
fixes https://github.com/vis2k/kcp2k/issues/22
124+
fixes https://github.com/skywind3000/kcp/pull/291
125+
- feature: OnData now includes channel it was received on
126+
127+
V1.12 [2021-07-16]
128+
- Tests: don't depend on Unity anymore
129+
- fix: #26 - Kcp now catches exception if host couldn't be resolved, and calls
130+
OnDisconnected to let the user now.
131+
- fix: KcpServer.DualMode is now configurable in the constructor instead of
132+
using #if UNITY_SWITCH. makes it run on all other non dual mode platforms too.
133+
- fix: where-allocation made optional via virtuals and inheriting
134+
KcpServer/Client/Connection NonAlloc classes. fixes a bug where some platforms
135+
might not support where-allocation.
136+
137+
V1.11 rollback [2021-06-01]
138+
- perf: Segment MemoryStream initial capacity set to MTU to avoid early runtime
139+
resizing/allocations
140+
141+
V1.10 [2021-05-28]
142+
- feature: configurable Timeout
143+
- allocations explained with comments (C# ReceiveFrom / IPEndPoint.GetHashCode)
144+
- fix: #17 KcpConnection.ReceiveNextReliable now assigns message default so it
145+
works in .net too
146+
- fix: Segment pool is not static anymore. Each kcp instance now has it's own
147+
Pool<Segment>. fixes #18 concurrency issues
148+
149+
V1.9 [2021-03-02]
150+
- Tick() split into TickIncoming()/TickOutgoing() to use in Mirror's new update
151+
functions. allows to minimize latency.
152+
=> original Tick() is still supported for convenience. simply processes both!
153+
154+
V1.8 [2021-02-14]
155+
- fix: Unity IPv6 errors on Nintendo Switch
156+
- fix: KcpConnection now disconnects if data message was received without content.
157+
previously it would call OnData with an empty ArraySegment, causing all kinds of
158+
weird behaviour in Mirror/DOTSNET. Added tests too.
159+
- fix: KcpConnection.SendData: don't allow sending empty messages anymore. disconnect
160+
and log a warning to make it completely obvious.
161+
162+
V1.7 [2021-01-13]
163+
- fix: unreliable messages reset timeout now too
164+
- perf: KcpConnection OnCheckEnabled callback changed to a simple 'paused' boolean.
165+
This is faster than invoking a Func<bool> every time and allows us to fix #8 more
166+
easily later by calling .Pause/.Unpause from OnEnable/OnDisable in MirrorTransport.
167+
- fix #8: Unpause now resets timeout to fix a bug where Mirror would pause kcp,
168+
change the scene which took >10s, then unpause and kcp would detect the lack of
169+
any messages for >10s as timeout. Added test to make sure it never happens again.
170+
- MirrorTransport: statistics logging for headless servers
171+
- Mirror Transport: Send/Receive window size increased once more from 2048 to 4096.
172+
173+
V1.6 [2021-01-10]
174+
- Unreliable channel added!
175+
- perf: KcpHeader byte added to every kcp message to indicate
176+
Handshake/Data/Ping/Disconnect instead of scanning each message for Hello/Byte/Ping
177+
content via SegmentEquals. It's a lot cleaner, should be faster and should avoid
178+
edge cases where a message content would equal Hello/Ping/Bye sequence accidentally.
179+
- Kcp.Input: offset moved to parameters for cases where it's needed
180+
- Kcp.SetMtu from original Kcp.c
181+
182+
V1.5 [2021-01-07]
183+
- KcpConnection.MaxSend/ReceiveRate calculation based on the article
184+
- MirrorTransport: large send/recv window size defaults to avoid high latencies caused
185+
by packets not being processed fast enough
186+
- MirrorTransport: show MaxSend/ReceiveRate in debug gui
187+
- MirrorTransport: don't Log.Info to console in headless mode if debug log is disabled
188+
189+
V1.4 [2020-11-27]
190+
- fix: OnCheckEnabled added. KcpConnection message processing while loop can now
191+
be interrupted immediately. fixes Mirror Transport scene changes which need to stop
192+
processing any messages immediately after a scene message)
193+
- perf: Mirror KcpTransport: FastResend enabled by default. turbo mode according to:
194+
https://github.com/skywind3000/kcp/blob/master/README.en.md#protocol-configuration
195+
- perf: Mirror KcpTransport: CongestionControl disabled by default (turbo mode)
196+
197+
V1.3 [2020-11-17]
198+
- Log.Info/Warning/Error so logging doesn't depend on UnityEngine anymore
199+
- fix: Server.Tick catches SocketException which happens if Android client is killed
200+
- MirrorTransport: debugLog option added that can be checked in Unity Inspector
201+
- Utils.Clamp so Kcp.cs doesn't depend on UnityEngine
202+
- Utils.SegmentsEqual: use Linq SequenceEqual so it doesn't depend on UnityEngine
203+
=> kcp2k can now be used in any C# project even without Unity
204+
205+
V1.2 [2020-11-10]
206+
- more tests added
207+
- fix: raw receive buffers are now all of MTU size
208+
- fix: raw receive detects error where buffer was too small for msgLength and
209+
result in excess data being dropped silently
210+
- KcpConnection.MaxMessageSize added for use in high level
211+
- KcpConnection.MaxMessageSize increased from 1200 bytes to to maximum allowed
212+
message size of 145KB for kcp (based on mtu, overhead, wnd_rcv)
213+
214+
V1.1 [2020-10-30]
215+
- high level cleanup, fixes, improvements
216+
217+
V1.0 [2020-10-22]
218+
- Kcp.cs now mirrors original Kcp.c behaviour
219+
(this fixes dozens of bugs)
220+
221+
V0.1
222+
- initial kcp-csharp based version
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// removed 2022-11-23
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// removed 2022-11-22
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// removed 2022-11-22
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// removed 2022-11-23
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// removed 2022-12-13

0 commit comments

Comments
 (0)