All Projects → KumoKyaku → Kcp

KumoKyaku / Kcp

Licence: mit
KCP C#版。线程安全,运行时无alloc,对gc无压力。

Projects that are alternatives of or similar to Kcp

Vanara
A set of .NET libraries for Windows implementing PInvoke calls to many native Windows APIs with supporting wrappers.
Stars: ✭ 544 (+85.03%)
Mutual labels:  dotnet-standard, nuget
Ecsrx
A reactive take on the ECS pattern for .net game developers
Stars: ✭ 288 (-2.04%)
Mutual labels:  unity, nuget
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (-58.84%)
Mutual labels:  dotnet-standard, nuget
Tusdotnet
.NET server implementation of the Tus protocol for resumable file uploads. Read more at https://tus.io
Stars: ✭ 298 (+1.36%)
Mutual labels:  dotnet-standard, nuget
covidtrackerapiwrapper
CovidSharp is a crossplatform C# API wrapper for the Coronavirus tracking API (https://github.com/ExpDev07/coronavirus-tracker-api)
Stars: ✭ 11 (-96.26%)
Mutual labels:  nuget, dotnet-standard
Centrifuge
Cross-platform runtime mod loader and API for any Unity-based game. Supports Unity 5 and up!
Stars: ✭ 18 (-93.88%)
Mutual labels:  unity, nuget
Openmod
OpenMod .NET Plugin Framework
Stars: ✭ 81 (-72.45%)
Mutual labels:  unity, nuget
Mirror
#1 Open Source Unity Networking Library
Stars: ✭ 2,905 (+888.1%)
Mutual labels:  unity, kcp
Pluralize.NET
📘 Pluralize or singularize any English word.
Stars: ✭ 50 (-82.99%)
Mutual labels:  nuget, dotnet-standard
PortaCapena.OdooJsonRpcClient
Odoo Client Json Rpc
Stars: ✭ 39 (-86.73%)
Mutual labels:  nuget, dotnet-standard
cv4pve-api-dotnet
Proxmox VE Client API .Net C#
Stars: ✭ 25 (-91.5%)
Mutual labels:  nuget, dotnet-standard
HardwareInformation
.NET Standard Cross-Platform Hardware Information Gatherer
Stars: ✭ 37 (-87.41%)
Mutual labels:  nuget, dotnet-standard
Unitynuget
Provides a service to install NuGet packages into a Unity project via the Unity Package Manager
Stars: ✭ 257 (-12.59%)
Mutual labels:  unity, nuget
Wavefunctioncollapse
Walk through an infinite, procedurally generated city
Stars: ✭ 3,392 (+1053.74%)
Mutual labels:  unity
Zcode Assetbundlepacker
Unity的AssetBundle模块扩展插件,主要目的用于简化AssetBundle打包,提供AssetBundle管理,支持热更新、支持资源包下载、支持版本控制。
Stars: ✭ 291 (-1.02%)
Mutual labels:  unity
Stuntman
Library for impersonating users during development leveraging ASP.NET Identity.
Stars: ✭ 285 (-3.06%)
Mutual labels:  nuget
Unity Weld
MVVM-style data-binding system for Unity.
Stars: ✭ 285 (-3.06%)
Mutual labels:  unity
Open Project 1
Unity Open Project #1: Chop Chop
Stars: ✭ 4,235 (+1340.48%)
Mutual labels:  unity
Tutorial 2d Game Unity
Unity tutorial to learn how to make a complete 2D Shoot'em Up
Stars: ✭ 290 (-1.36%)
Mutual labels:  unity
Discord Rpc Csharp
C# custom implementation for Discord Rich Presence. Not deprecated and still available!
Stars: ✭ 282 (-4.08%)
Mutual labels:  unity

KCP C#版。

支持目标框架:

  • dotnetstandard2.0
  • dotnetstandard1.1

开箱即用。也可以使用Nuget 搜索KCP。

新增异步API标准接口

附带一个基本实现。

新增kcpSegment泛型化,可由用户自定义高性能实现。

链接:

c: skywind3000 KCP
go: xtaci kcp-go

用法:

请参考C版本文档。

说明:

  • 内部使用了unsafe代码和非托管内存,不会对gc造成压力。

  • 对于output回调和TryRecv函数。使用RentBuffer回调,从外部分配内存。请参考IMemoryOwner用法。

  • 支持Span<byte>

测试:

[已修复]同一个进程两个Kcp echo测试,至少使用3个线程,否则可能死锁。

在UnitTestProject1路径下执行 dotnet test 可进行多框架测试。(需要安装dotnetcoreSDK)

相对C版的一些变化:

差异变化 C版 C#版
数据结构
acklist 数组 ConcurrentQueue
snd_queue 双向链表 ConcurrentQueue
snd_buf 双向链表 LinkedList
rcv_buf 双向链表 LinkedList
rcv_queue 双向链表 List
-------------- -------------- --------------
回调函数 增加了RentBuffer回调,当KCP需要时可以从外部申请内存。
多线程 增加了线程安全。
流模式 由于数据结构变动,移除了流模式。
interval最小间隔 10ms 0ms(在特殊形况下允许CPU满负荷运转)
-------------- -------------- --------------
API变动
增加大小端编码设置。默认小端编码。
增加TryRecv函数,当可以Recv时只peeksize一次。
ikcp_ack_push 删除了此函数(已内联)
ikcp_ack_get 删除了此函数(已内联)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].