Communication.Shared
2.3.0
See the version list below for details.
dotnet add package Communication.Shared --version 2.3.0
NuGet\Install-Package Communication.Shared -Version 2.3.0
<PackageReference Include="Communication.Shared" Version="2.3.0" />
<PackageVersion Include="Communication.Shared" Version="2.3.0" />
<PackageReference Include="Communication.Shared" />
paket add Communication.Shared --version 2.3.0
#r "nuget: Communication.Shared, 2.3.0"
#:package Communication.Shared@2.3.0
#addin nuget:?package=Communication.Shared&version=2.3.0
#tool nuget:?package=Communication.Shared&version=2.3.0
DS_Communication
연결형 통신 전송 계층 라이브러리. Session·Channel·Framing·Pipeline을 제공하고,
직렬화 포맷은 IMessageConverter로 앱이 주입합니다. .NET Standard 2.1 (Unity 호환).
패키지
| 패키지 | 내용 | 의존 |
|---|---|---|
Communication.Shared |
Session, Pipeline, Channel 계약, Framing, SendOptions, DisconnectReason |
(없음) |
Communication.Network.TCP.Shared |
TcpSession, StreamByteChannel, TcpTransportOptions |
Shared |
Communication.Network.TCP.Server |
TcpListener 수락 루프 |
TCP.Shared |
Communication.Network.TCP.Client |
TcpConnector 연결 |
TCP.Shared |
Communication.Network.RUDP.Shared |
RudpSession, RudpMessageChannel, RudpSendOptions/RudpDeliveryMethod, RudpTransportOptions |
Shared |
Communication.Network.RUDP.Server |
RudpListener 수락 루프 |
RUDP.Shared |
Communication.Network.RUDP.Client |
RudpConnector 연결 |
RUDP.Shared |
dotnet add package Communication.Shared
dotnet add package Communication.Network.TCP.Server # 서버만 필요하면
dotnet add package Communication.Network.TCP.Client # 클라이언트만 필요하면
dotnet add package Communication.Network.RUDP.Server # RUDP 서버만 필요하면
dotnet add package Communication.Network.RUDP.Client # RUDP 클라이언트만 필요하면
주요 동작
- 길이 프레이밍: 4바이트 little-endian 길이 + payload. 기본 프레임 상한 4MB(절대 상한 64MB).
- 송신: 큐 + 백프레셔(상한 도달 시 비동기 대기) + coalesce 배치 쓰기(기본 64KB). 직렬화 실패 항목은 격리(해당 플러시만 예외)하고 송신은 계속.
- 수신: 프레임 완료 마감(기본 30초, 첫 바이트 도착 시 시작) 초과 시
DisconnectReason.Timeout단절. - 끊김은
Session.Disconnected(DisconnectReason)1회 통지. 재접속·하트비트는 앱 책임.
빠른 시작
// 서버 — 수락된 채널 위에 세션은 앱이 만든다.
using var listener = new TcpListener(IPAddress.Any, 32000);
listener.Accepted += channel =>
{
var session = new TcpSession(channel, new MyConverter(), s => new MyHandler(s));
session.Disconnected += (_, e) => Console.WriteLine($"끊김: {e.Reason}");
};
listener.Start(new TcpTransportOptions { MaxConnections = 1000 });
// 클라이언트
var connector = new TcpConnector();
if (await connector.ConnectAsync("127.0.0.1", 32000))
{
var session = new TcpSession(connector.Channel!, new MyConverter(), s => new MyHandler(s));
await session.SendAndFlushAsync(new MyMessage());
}
옵션 상세는 Document/03-Reference/Configuration.md 참고.
저장소 구조
| 경로 | 설명 |
|---|---|
Source/ |
라이브러리 7 패키지 |
Test/Communication.Tests |
xUnit 테스트 (dotnet test) |
Sandbox/Chat.TCP |
TCP 채팅 샘플 (--selftest 프로세스 내 왕복 검증) |
Sandbox/Chat.RUDP |
RUDP 채팅 샘플 (--selftest 프로세스 내 왕복 검증) |
Document/ |
Obsidian 문서 vault — 입구 Document/01-Overview/Home.md |
Legacy/ |
이전 스택·문서 아카이브 (유지보수 대상 아님) |
배포
v* 태그 → Communication.Shared, tcp/v* 태그 → TCP 3종, rudp/v* 태그 → RUDP 3종 (GitHub Actions nuget-publish.yml).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Communication.Shared:
| Package | Downloads |
|---|---|
|
Communication.Network.RUDP.Shared
Shared reliable-UDP transport layer for DS_Communication — no third-party types appear in the public API. Provides RudpSession, RudpMessageChannel with per-message RudpSendOptions/RudpDeliveryMethod (unreliable, reliable, reliable-ordered), and RudpTransportOptions with optional DTLS 1.2 encryption (BouncyCastle) and CRC32C integrity checking. One dedicated polling thread per host plus per-session dispatch queues keep load independent of connection count. Targets .NET Standard 2.1 — runs on modern .NET and Unity. |
|
|
DRPC.Shared
Shared runtime for DRPC — a distributed RPC library for .NET that runs over reliable UDP. Contains HubBase (pending-call table with per-call timeouts, cancellation tokens, and pending/incoming concurrency caps), the wire message model (one-way calls signal CallId 0), the structured error model surfaced as RpcFaultException with typed RpcErrorCode values, and incoming routing. Transport (RUDP with optional DTLS 1.2 encryption and certificate pinning) comes from DS_Communication; serialization from DS_MessageProtocol. Common foundation of the DRPC.Client and DRPC.Server packages — reference it alongside DRPC.Attribute in the contract project shared by both sides. Targets netstandard2.1 for modern .NET and Unity 2021.2+. |
|
|
Communication.Network.TCP.Shared
Shared TCP transport layer for DS_Communication: TcpSession, StreamByteChannel and TcpTransportOptions with optional TLS (SslStream, handshake timeout enforced). Transports expose only a byte channel — the application creates and owns sessions, and disconnection surfaces solely as Session.Disconnected(DisconnectReason). Targets .NET Standard 2.1 — runs on modern .NET and Unity. |
|
|
Communication.Network.TCP_IOCP.Shared
IOCP TCP 공유 메시지·세션 컴포넌트 (.NET Standard 2.1, Unity 호환). |
|
|
Communication.Network.TCP_IOCP.Server
IOCP 기반 TCP 서버 (.NET Standard 2.1, Unity 호환). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.7.0 | 558 | 9/13/2026 |
| 2.6.0 | 262 | 9/13/2026 |
| 2.5.2 | 253 | 9/13/2026 |
| 2.5.1 | 550 | 9/9/2026 |
| 2.5.0 | 572 | 9/8/2026 |
| 2.4.1 | 271 | 9/7/2026 |
| 2.4.0 | 550 | 9/7/2026 |
| 2.3.1 | 268 | 9/7/2026 |
| 2.3.0 | 650 | 9/7/2026 |
| 2.2.1 | 358 | 9/7/2026 |
| 2.2.0 | 258 | 9/7/2026 |
| 2.1.0 | 269 | 9/7/2026 |
| 2.0.1 | 545 | 9/7/2026 |
| 2.0.0 | 463 | 9/3/2026 |
| 1.0.2 | 390 | 7/11/2026 |
| 1.0.1 | 378 | 7/11/2026 |
| 1.0.0 | 699 | 5/2/2026 |